answersLogoWhite

0


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();

}

User Avatar

Wiki User

12y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Print a c program to find greatest of 4 numbers?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

C program to find greatest of three numbers?

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


Program to print all the even numbers of an array in visual basic?

find even number in array


Write the program in qbasic and add two numbers?

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


Write a program to print first 100 alternative prime numbers?

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


Program to find the greatest number?

The greatest number is infinity.


How do you find the greater number in qbasic?

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 &gt; A THEN G = B. PRINT "The greater number is "; G


Can you find the greatest common multiple of two numbers?

The greatest common multiple of any two numbers is infinite.


Draw a flowchart that will determine and display the largest among the three numbers being inputted?

start input A &amp; B if A&gt;B print A is greatest if B&gt;A print B is greatest stop james ola writes.....SOT.


How to write a C program to find largest 2 numbers using pointers?

program to find maximum of two numbers using pointers


What is the greatest common factor of 400?

You need at least two numbers to find a GCF.


Why can't you find the greatest common multiple in a group of numbers?

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


How do you write a VBnet program to find the prime numbers between 100 to 200?

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