Best Answer

#include<stdio.h>

#include<conio.h>

void main()

{

int a[4],max,i;

clrscr();

printf("Enter the four numbers:\n");

for(i=0;i<4;i++)

scanf("%d",a[i]);

max=a[o];

for(i=1;i<4;i++)

{

if(a[i]>max)

{

max=a[i];

}

}

printf("The Greatest number is %d",max);

getch();

}

Q: Print a c program to find greatest of 4 numbers?

Write your answer...

Submit

Still have questions?

Continue Learning about Movies & Television

Yes.First find the HCF of two of the numbers, then find the HCF of that answer and the third number.In this way you could find the HCF of as many numbers as you want.

You need at least two numbers to find a GCF.

You need at least two numbers to find a GCF.

You need at least two numbers to find a GCF.

There cannot be a greatest common factor (GCF) of just one number. To be common there need to be at least two numbers. If you find all the factors of two or more numbers, and you find some factors are the same ("common"), then the largest of those common factors is the Greatest Common Factor.

Related questions

# include<stdio.h> main() { int a,b,c; print f("enter the values of a,b,c"); scan f("%d%d%d",&a,&b,&c); if((a>b)&&(a>c)) print f("Greatest value is a =%d",a); else if((b>a)&&(b>c)) print f("Greatest value is b=%d",b); else print f("Greatest value is c=%d",c); }

find even number in array

Cls input "enter two no.s ",a,b sum=a+b print "sum = ";sum end

This would require some computer knowledge. It can make it easier to find out the prime numbers without figuring it out in your head.

The greatest number is infinity.

Give your numbers the names 'A' and 'B', and use these program lines. Whichever of the two numbers is greater will be printed. G = A If B > A THEN G = B. PRINT "The greater number is "; G

start input A & B if A>B print A is greatest if B>A print B is greatest stop james ola writes.....SOT.

The greatest common multiple of any two numbers is infinite.

program to find maximum of two numbers using pointers

You need at least two numbers to find a GCF.

You can't find the greatest common multiple in any amount of numbers, the number would be infinite.

VBnet program to find the prime numbers between 100 to 200?