Write a C Program to find the Greatest from a set of numbers





Write a C Program to find the Greatest of the set of numbers,Array, Sumit Kar


#include<stdio.h>


void main()

{

 int arr[10],i,max=0;

 printf("\nEnter 10 values:");

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

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


 max=arr[0];

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

 {

  if(max<arr[i])

   max=arr[i];

 }


 printf("Greatest number of Array: %d",max);










}


0 Comments