i want to know how can i find the maximum and minimum value in c++ by user input value and and user also put the limit for for loop , for example :
Write a c++ prog
you should define the maximum as the lowest possible value:
int maximum = -INFINITY;
then at each value compare and set new maximum if necessary:
if (ivalue > maximum) maxumum = ivalue;
for minimum you would use the same kind of logic...