LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (http://www.linuxquestions.org/questions/programming-9/)
-   -   steps to write, compile, and execute a C program in Linux environment (http://www.linuxquestions.org/questions/programming-9/steps-to-write-compile-and-execute-a-c-program-in-linux-environment-710494/)

arnoldschrewanger 03-10-2009 10:24 AM

steps to write, compile, and execute a C program in Linux environment
 
a=$1
b=$2
c=$3

if [ $# -lt 3 ]
then
echo "$0 n1 n2 n3"
exit 1
fi

if [ $a -gt $b -a $a -gt $c ]
then
echo "$a is largest integer"
elif [ $b -gt $a -a $b -gt $c ]
then
echo "$b is largest integer"
elif [ $c -gt $a -a $c -gt $b ];
then
echo "$c is largest integer"
else
echo "Sorry cannot guess number"
fi

wje_lq 03-10-2009 11:17 AM

This looks like a shell script, not a C program.

Do you have some sort of question?


All times are GMT -5. The time now is 06:17 PM.