Ticker

6/recent/ticker-posts

Program to find largest number among any number(n number) in c programming : code

 


#include<stdio.h>

void main(){

    int i,n,num[100],max=0;

    printf("enter the size of array not more than 100: ");

    scanf("%d",&n);

    printf("enter array element : ");

    for(i=0;i<n;i++){

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

        if(num[i]>max){

            max=num[i];

        }

    }

    printf("the largest number among n number is : %d ",max);

}




Reactions

Post a Comment

0 Comments