fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. int num1, num2, num3;
  5. printf("Enter 3 numbers: ");
  6. scanf("%d %d %d", &num1, &num2, &num3);
  7.  
  8. if (num1 >= num2 && num1 >= num3) {
  9. printf("Greatest number is %d", num1);
  10. } else if (num2 >= num1 && num2 >= num3) {
  11. printf("Greatest number is %d", num2);
  12. } else {
  13. printf("Greatest number is %d", num3);
  14. }
  15.  
  16. return 0;
  17. }
  18.  
Success #stdin #stdout 0s 5284KB
stdin
780
768
344
stdout
Enter 3 numbers: Greatest number is 780