0% found this document useful (0 votes)
44 views1 page

Find Largest 3 Digit Number

The program asks the user to input three integer numbers, stores them in variables, and then compares the numbers to determine which is greatest by using if/else statements.

Uploaded by

Sommu John
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
44 views1 page

Find Largest 3 Digit Number

The program asks the user to input three integer numbers, stores them in variables, and then compares the numbers to determine which is greatest by using if/else statements.

Uploaded by

Sommu John
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

#include<stdio.

h>
int main()
{
int num1,num2,num3;

//Ask user to input any three integer numbers


printf("\nEnter value of num1, num2 and num3:");
//Store input values in variables for comparsion
scanf("%d %d %d",&num1,&num2,&num3);

if((num1>num2)&&(num1>num3))
printf("\n Number1 is greatest");
else if((num2>num3)&&(num2>num1))
printf("\n Number2 is greatest");
else
printf("\n Number3 is greatest");
return 0;
}

You might also like