Friday, April 16, 2010

Biggest out of 10

#include<iostream.h>
#include<conio.h>
 void main()
 {
 clrscr();
 int num,n,a=0;
 cout<<"enter 10 nos.";
 for(num=1;num<=10;num++)
 {
 cin>>n;
 if(a<n)
 {
 a=n;
 }
 }
 cout<<"biggest no. is"<<a;
 getch();
 }

No comments:

Post a Comment