waglekiran919
waglekiran919 waglekiran919
  • 18-02-2021
  • Computers and Technology
contestada

a c program to check the greaster number among the two entered number using if else statement​

Respuesta :

tonb
tonb tonb
  • 18-02-2021

Answer:

#include <stdio.h>

int main(void) {

 int number1, number2;

 printf("Enter first number: ");

 scanf("%d", &number1);

 printf("Enter second number: ");

 scanf("%d", &number2);

 if (number1 > number2) {

   printf("%d is greater than %d!", number1, number2);

 } else if (number2 > number1) {

   printf("%d is greater than %d!", number2, number1);  

 } else {

   printf("%d is equal to %d!", number1, number2);

 }

}

Answer Link

Otras preguntas

18. Evaluate p/q - r^2s  p = 60, q = 4, s = 3, r = 2 [] 3 [] 18 [] 69 [] 59
ten less than the square of A. 10-a^2 or a^2- 10
Which class level is honey bees
what is the lenght of the distance between the chair and the end table ?
Independent variable vs dependent variable example
Read the sentence. “The largest recorded earthquake in the United States occurred in Prince William Sound, Alaska, in 1964.” This quote appeared in an essay
What is the square root of 24 rounded to the nearest tenth?
12 POINTS Which is a mixture that will separate naturally A) Salt Water B) Drawer of office supplies C) Oil and Vinegar salad dressing
A rectangular prism has a length of 12 centimeters, width of 18 centimeters, and a height of 22 centimeters. Describe the effect on the volume of a rectangular
Can someone translate Hi my name is mrs piggy and I like to eat pie.I also like Kermit the frog but he’s kind of annoying in Spanish Thank you