OLD IS GOLD COMPUTER PROGRAMMING IN C GRADE XII- 2076|QN 3

OLD IS GOLD COMPUTER PROGRAMMING IN C GRADE XII- 2076|QN 3

Define array. Write a C program to input any 10 numbers in an array and display it. Find the biggest number among the inputs numbers.

For information about an array

Click here

Write a C program to input any 10 numbers in an array and display it. Find the biggest number among the inputs numbers.

#include<stdio.h>

#include<conio.h>

void main()

{

int num[10], i, max;

printf("\n Enter 10 numbers:");

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

{

scanf("%d",&num[i]);

}

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

{

printf("\n %d",num[i]);

}

max=num[0];

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

{

if(num[i]>max)

{

max=num[i];

}

}

printf("\n Biggest number=%d",max);

getch();

}

Output




Post a Comment

0 Comments