Answers for "Find the largest number in a table"

C
0

Find the largest number in a table

#include <stdio.h>
int main(void) {
 int i,n,m,t[50];
printf("How long do you want your table? :");
scanf("%d",&n);
 for (i=0;i<n;i++){
printf("enter the %d number :",i+1);
scanf("%d",&t[i]);
 }
 m=t[0];
 for (i=0;i<n;i++){
   if (m<t[i])
   m=t[i];
    }
printf("The largest number in this table is : %d\n",m);

  return 0;
  }
Posted by: Guest on July-05-2021

Code answers related to "Find the largest number in a table"

Code answers related to "C"

Browse Popular Code Answers by Language