Fun with Unix and C++!!!

greenspun.com : LUSENET : All Things Final Fantasy II : One Thread

I'm posting this from a comp lab DURING class...hehehe..on a UNIX system....anyway, i wroted my forst crappy program...yay..

here it is...

// //Purpose: to ask the user for a grade // then tell the user what the grade is // Program by Davey Rootbeer 9/4/02 // #include void main () { int number; cout << "Please enter a grade between 0 and 100 -->"; cin >> number; if (number<0) cout << "Grade cannot be less than 0. Please try again. \n"; if (number>=0 && number<=59) cout << "that is an F \n"; if (number>=60 && number<=69) cout << "that is a D \n"; if (number>=70 && number<=79) cout << "that is a C \n"; if (number>=80 && number<=89) cout << "that is a B \n"; if (number>=90 && number<=99) cout << "that is an A \n"; if (number==100) cout << "that is an A+ \n"; if (number>100) cout << "Number can't be bigger then 100. Please try again. \n"; // // cout << "\n"; cout << "Thank you very much, and have a nice day! \n"; }

-- Anonymous, September 04, 2002

Answers

well, umm...it looked better with spacing and all that stuffs....

-- Anonymous, September 04, 2002

yay!! Davey is learning C!!! now we can talk to eachother in a computer language... kinda..
...puts("Hello, you!");...

-- Anonymous, September 04, 2002

YaBasic/basic program writer or something.

-- Anonymous, September 05, 2002

gah! C, not basic!!

-- Anonymous, September 05, 2002

2 home
5 for t=1 to 3000
10 next t
15 print " "
20 print " "
30 rem This program was written in BASIC by Davey Rootbeer
35 rem 9/5/02
40 print " I could have written this in basic,"
45 print " but it's so hard to find a decent compiler..."
50 print " "
55 input "Don't you agree? ";A$
60 if A$="Yes" then goto 100
65 if A$="no" then goto 200
70 goto 55
100 print " "
105 print "well, i'm so glad we've come to an agreement."
110 print "have a nice day!"
115 goto 800
200 print " "
205 print "Well, then, you're a jerk!"
210 print "go to hell!"
215 goto 800
800 end


-- Anonymous, September 05, 2002


There, see THAT is basic.

-- Anonymous, September 05, 2002

uhg, BASIC? Don't bother. It's not structured.

-- Anonymous, December 08, 2002

Moderation questions? read the FAQ