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);










}


Comments

Popular posts from this blog

Write a Program to Add two 3x3 Matrix using C

C program for Unit Conversion

Write a Program to Add two 5x5 Matrix using C