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;
//
}
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