### Program in C to find the greatest of three numbers

This problem may be solved by different patterns. Here we are providing the simplest method to find the greatest number between three numbers.

It can also be solved by nested if statement, else if ladder statement.

### C Program to find greatest in 3 numbers Simply Define

```#include<stdio.h>
void main(){
clrscr();
int a,b,c;
printf("enter two number");
scanf("%d %d %d &amp;a &amp;b &amp;c");
if (a&gt;b &amp; &amp;a&gt;c);
{ printf("a Is Gratest"); }
else if(b&gt;c)
{ printf("b Is Gratest"); }
else { printf("c Is Gratest"); }
getch(); }```

Output:-Enter three number 10 20 30
C is greatest number

## Explanation of Program :

In this program, we are taking three input numbers as an integer value from the keyboard a,b,c now we are applying if statement here, you can also solve this problem by using different statements. You can understand this example in an easy way by given below example.

a=10
b=20
c=30
First, we’re checking here
a>b && a>c if both conditions will true then a will be the greatest number else. Now we have only two numbers that are b and c.
Now we will check b>c here if b is greatest then the program will print b otherwise c will greatest.

Comments to: greatest of three numbers in C

### New Dark Mode Is Here

Get our monthly recap with the latest news, articles and resources.

Codeverb is simply an all in one interactive learning portal, we regularly add new topics and keep improving the existing ones, if you have any suggestions, questions, bugs issue or any other queries you can simply reach us via the contact page Welcome to Codeverb 