Computer Science, asked by preetinayak416, 2 months ago

algorithm for largest among n number in c programming ​

Answers

Answered by himanshu2006vps
1

#include <stdio.h>

#include <conio.h>

int main()

{

int i,num,n,large=0;

printf("How many numbers: ");

scanf("%d",&n);

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

{

printf("\nEnter number %d: ",i+1);

scanf("%d",&num);

if(num>large)

large=num;

}

printf("\n\nThe Largest Number is %d",large);

return 0;

}

Similar questions