Responsive Ads Here

Friday, November 21, 2014

Find the maximum in easy way

//maximum easy way.


#include<stdio.h>
main()
{
int a[10],i,j,max=-100;
printf("enter 10 number :\n");
for(i=0;i<10;i++)
{
printf("enter a[%d]=",i);
scanf ("%d",&a[i]);

}
for(i=0;i<10;i++)
{
if(a[i]>max)
{
max=a[i];
}
}
printf ("maximum %d\n",max);
return 0;

}

No comments:

Post a Comment

php4

<?php    // Start the session  session_start();  ?>  <!DOCTYPE html>  <html>  <head>       <link rel=&q...