Tuesday, 27 December 2016

C PROGRAMMING PROJECT 5

FINDING LARGEST NUMBER IN ARRAYS


#include<stdio.h>
#include<conio.h>

void main()
{
int a[4],temp,i;
printf("enter the values");
for (i=0;i<4;i++)

{
scanf("%d",&a[i]);
}
temp=a[0];
for (i=0;i<4;i++)
{
if(temp<a[i])
{
temp=a[i];
}
}
printf("largest number is =%d",temp);
getch();
}

No comments:

Post a Comment