LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 03-10-2009, 09:24 AM   #1
arnoldschrewanger
LQ Newbie
 
Registered: Mar 2009
Posts: 1

Rep: Reputation: 0
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

Last edited by arnoldschrewanger; 03-10-2009 at 09:26 AM. Reason: error msg
 
Old 03-10-2009, 10:17 AM   #2
wje_lq
Member
 
Registered: Sep 2007
Location: Mariposa
Distribution: Debian lenny, Slackware 12
Posts: 809

Rep: Reputation: 178Reputation: 178
This looks like a shell script, not a C program.

Do you have some sort of question?
 
  


Reply

Tags
compile, environment, execute, linux, program, steps, write


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: How to Write a Linux Virus in 5 Easy Steps LXer Syndicated Linux News 10 02-20-2009 06:50 AM
Articles to illustrate Linux server goodness DaveQB Linux - Enterprise 2 06-26-2007 09:11 PM
How to execute exe file in Linux or Unix Environment? dwarf007 Linux - General 2 02-23-2006 04:29 AM
how to execute a .exe file in linux environment from a c program? aakanksh_c Linux - General 1 09-18-2005 04:26 AM
i need to write a program it has to execute automatically ykirankumar Linux - Software 5 08-31-2004 12:34 AM


All times are GMT -5. The time now is 07:16 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration