Hello again guys!
So I've been working on a program that accepts 2 inputs a & b
and does the following:
Get another b number of inputs ,may contain negative nos and
print the largest and the smallest input numbers.
Here's my code : </3
Code:
{
max = input;
min = input;
while (count<=b)
{ printf("--> Please enter another %d numbers\n", b);
scanf("%d", &input);
if ( input > max )
{
max = input;
}
if (input < min )
{
min = input;
}
count+=1;
}
}
printf( "The biggest integer is %d\n", max );
printf( "The smallest integer is %d\n", min );
It only prints the smallest integer. i cant find the problem. Please help me find it. Thanks!