C Program to print highest number without using array.

 Hello Everyone,

this program is to find the highest numbers among 10 numbers without using the array. So it is very interesting and exciting project. 


So let's get started .


Question : 

  Write a Program to find the highest number among 10 numbers without using array.


solution :


#include<stdio.h>
#include<conio.h>
void main()
{
int a,i,b=0;
clrscr();
printf("enter 10 numbers \n");
for(i=1;i<=10;i++)
{
printf("enter numbers ");
scanf("%d",&a);
if(a>b)
b=a;
}
printf("maximum number is %d",b);
getch();
}

 

output



Hope you enjoyed it . Tuned it more codes.

Comments

Popular Posts