Lets work

with python Shell

with python Shell

Start working on C Program

Easy codes to find the biggest number

Lets try out the example

In this C program, you need to enter the three integer numbers to find the largest one among them.
For instance, in the C program you need to enter three numbers i.e. num1, num2 & num3 as input and it would compare the numbers and display the largest number as output.

Check the first number with the other two numbers whether it is greater or not.

Repeat previous step.

Print the greatest number among all and exit.

` ````
/*C program to find greatest of three numbers using function*/
#include
```
/*function to get largest among three numbers*/
int largestNumber(int a,int b, int c)
{
int largest=0;
if(a>b && a>c)
largest=a;
else if(b>a && b>c)
largest=b;
else
largest=c;
return largest;
}
int main()
{
int a,b,c;
printf("Enter three numbers: ");
scanf("%d%d%d",&a,&b,&c);
printf("Largest number is: %d\n",largestNumber(a,b,c));
return 0;
}

` ````
Enter three numbers: 100 158 94
Largest number is: 158
```