Write a program in C language to input two language and find greatest among two number

Computers

Question
Write a program in C language to input two language and find greatest among two number
Answer

#include <stdio.h> int main() { int num1, num2; printf("Enter two numbers: "); scanf("%d %d", &num1, &num2); if (num1 > num2) printf("%d is greater than %d", num1, num2); else printf("%d is greater than %d", num2, num1); return 0; }

Download to view full explanation
This program takes two numbers as input from the user and compares them to find the greatest number. The program first declares two integer variables, num1...
Solve any homework question FREE with our app, NO PAYMENT required!