//This programme is tested on visual studio 2012//
#include <iostream>
using namespace std;
void main()
{
unsigned int a, max=0;
cout<<"------------------------------------------------------------------------------\n";
cout<<"This programme will input integers and print maximum number on entering -99\n";
cout<<"------------------------------------------------------------------------------\n";
cout<<"Enter number \n";
cin>>a;
while (a!=-99)
{
while (max<a)
{
max=a;
}
cout<<"Enter number\n";
cin>>a;
}
cout<<"The Greatest number is = "<<max;
cout<<"\n\n------------------------------------------------------------------------------\n";
cout<<"Thank You for using.\n\nVisit http://bilalzahid22.blogspot.com/ for more\n";
cout<<"\n------------------------------------------------------------------------------\n";
}


0 comments:
Post a Comment