+ 1

Write a c++ program to find the maximam and minimum.of a set of number?

2nd Jan 2017, 10:19 AM
sanjoy dey
6 Respostas
0
Declare a variable which hold your minimum and one for your maximum. Go through each element by using a foreach loop and do following comparisons If x is lower then your minimum, assign x to your minimum. If x is bigger then your maximum, assign x to your maximum. Good Luck
2nd Jan 2017, 10:30 AM
Andreas K
Andreas K - avatar
0
To improve the quality of my answers I would like you to give me feedback to my earlier answer
2nd Jan 2017, 11:10 AM
Andreas K
Andreas K - avatar
0
i want c++ code.
2nd Jan 2017, 11:11 AM
sanjoy dey
0
I do not like giving complete code solutions but may I can give you a solution for a similar case. So you can modify it?
2nd Jan 2017, 11:13 AM
Andreas K
Andreas K - avatar
0
ok...post the similar program. thank you.
2nd Jan 2017, 11:14 AM
sanjoy dey
2nd Jan 2017, 11:23 AM
Andreas K
Andreas K - avatar