C Programming

These notes are in addition to the text book used in the class of BAA2013 Computer Programming in C++.

Sunday, May 21, 2006

max and minimum number

Store the max and minimum numbers in their respective declared variable

void main()
{
int Num;
int Max=0;
int Min=1000;
//

cin>>Num;
if (Num > Max)
Max=Num;
if (Num < Min)
Min=Num;
//
}

0 Comments:

Post a Comment

<< Home