Computer Science, asked by jagannathshaw442, 1 month ago

write a program which will find out the bigger number by using math function.

Answers

Answered by MrTSR
0

Answer

C program to find the biggest of three numbers

#include<stdio.h>

int main()

{

 int num1,num2,num3;

 printf("Enter a number 1\n");

 scanf("%d",&num1);

 printf("Enter a number 2\n");

 scanf("%d",&num2);

 printf("Enter a number 3\n");

 scanf("%d",&num3);

 if((num1>num2) && (num1>num3))

 {

    printf("%d is bigger\n",num1);

 }

 else if((num2>num1) && (num2>num3))

 {

   printf("%d is bigger\n",num2);

 }

 else

 {

   printf("%d is bigger\n",num3);

 }

}

Example Output

Enter a number 1: 50

Enter a number 2: 70

Enter a number 2: 80

80 is bigger

NOTE: Program has been runned in VS Códe with output in the above attachment.

Attachments:
Similar questions