Showing posts with label Linux. Show all posts
Showing posts with label Linux. Show all posts

Tuesday, February 22, 2011

Simple Linux Program



This is a program related to addition ,subtraction,Multiplication and division of two number .coding of program is given below .write it on terminal ,then save the file,make executable file using chmode command .
Coding is: 
                                           
echo Enter First Number
read num
echo Enter Second Number
read num1

while true
do
 printf "\t***MENU***\n1.Addition\n2.Subtraction\n3.Multiplication\n4.Division \n5.Exit\n\tEnter your choice:"
read ch

 case $ch in
1) add=`expr $num + $num1`
   echo Addition is $add
   ;;

2) sub=`expr $num - $num1`
   echo Subtraction is $sub
   ;;

3) mul=`expr $num \* $num1`
   echo Multiplication is $mul
   ;;

4) div=`expr $num / $num`
   echo Division is $div
   ;;

Monday, February 21, 2011

Linux Programming

Basic Of Linux:

Linux is freely distributed implementation of a UNIX like kernel ,the low level core of an operating system.

As Linux is inspired from Unix at most all programs written for UNIX,can be compiled and run on Linux.


Unix was originally written in c and the majority of Unix applications are written in c but c is not the only option available to Linux programming.Programming languages available to the Linux programmer are c,c++,FORTRAN,icon,java,javascript,Lisp,sql,Borne shell.