A project for CSCS 1320 by Paul Sechrist during the Spring 2013.
C program must:
#include<stdio.h> int main() { int a; fprintf(stdout, "Please enter a number:\n"); fscanf(stdin,"%u", &a); if (a<50) { fprintf(stdout, "YOU SUCK! \n"); } else if (a==50) { fprintf(stdout, "you ruined the joke....\n"); } else if (a>50) { fprintf(stdout, "Wellllll, someone's over compensating"); } return(0); }
lab46:~/src$ ./numif Please enter a number: 1 YOU SUCK! lab46:~/src$ ./numif Please enter a number: 50 you ruined the joke.... lab46:~/src$ ./numif Please enter a number: 100 Wellllll, someone's over compensating.... lab46:~/src$
Fairly easy, good way to learn how to use if statements.
Kellen kinda helped…. a bit.