Solution for Exercise 8-4
ex0804
#include <stdio.h> int main() { int first,second; printf("Input the first value: "); scanf("%d",&first); printf("Input the second value: "); scanf("%d",&second); puts("Evaluating..."); if(first<second) { printf("%d is less than %d\n",first,second); } if(first>second) { printf("%d is greater than %d\n",first,second); } return(0); }
Output
Input the first value: 10
Input the second value: 40
Evaluating...
10 is less than 40
Notes
* The output above assumes 10 was typed as the first value and 40 as the second.
Copyright © 1997-2024 by QPBC.
All rights reserved