Twitter Feed Facebook Google Plus Youtube

Adsense responsive

Recent Post below header

Wednesday, 30 January 2013

C PROGRAM: TO FIND HIGHEST NUMBER FROM N NUMBER OF TERMS


CODING:
#include<stdio.h>
#include<conio.h>
void main( )
{
int a[100],max,i,n;
clrscr( );
printf("Enter number of terms ");
scanf("%d",&n);
printf("Enter %d values ",n);
for(i=1;i<=n;i++)
{
 scanf("%d",&a[i]);
}
max=a[1];
for(i=2;i<=n;i++)
{
 if(max<a[i])
 max=a[i];
}
printf("Highest number = %d",max);
getch( );
}

CODING


OUTPUT
 For any query or suggestion please comment below....

No comments:

Post a Comment