C/C++ Programs
Home
C programs
C++ Programs
Home
About
Contact
Home
C programs
Write a C program to find the largest number among 10 given numbers
Write a C program to find the largest number among 10 given numbers
Bibek Adhikari
April 04, 2013
#include<stdio.h>
int main()
{
int a[10],i,n,j;
for(i=0;i<10;i++)
{
printf("Enter the number(%d)",i);
scanf("%d",&a[i]);
}
n=a[0];
for(j=0;j<10;j++)
{
if (n<a[j])
n=a[j];
}
printf("The largest number is : %d",n);
return 0;
}
Post a Comment
0 Comments
Most Popular
More programs
Loading...
Python Codes
Loading...
Contact form
0 Comments