logoISU  

CS256 - Principles of Structured Design

Fall 2021

Displaying ./code/sternflCode/h5/printBigger.c

/*
printBigger.c
You will get two numbers from the user, then print whichever number is bigger.
Just print that number, and then a newline to the terminal.
*/
#include <stdio.h>
int main(){
int a, b; // declaring two int variables
//use printf ask the user for a number
//then use scanf to get the number from the user and store it in the variable
printf("Enter a number: ");
scanf("%d", &a); //
//repeat the above step once more for the other variable (you add this code)
/*
then use an if-else statement to determine which number to print. we
want to print which number is bigger.
Also, dont forget to include a newline character "\n" at the end of your
string.
*/
//put the if-else here
return 0;
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX