0

In C++Define two functions to print the maximum and the minimum number respectively among three numbers entered by user.??

Plz help

26th Dec 2019, 6:45 PM
THE CRAZY ONE ✌️
THE CRAZY ONE ✌️ - avatar
30 Réponses
+ 7
The typical way to get a minimum for example is to create a variable with the first value of your list of values. Then you loop over the rest of your list and check for every value, if it is lower than your stored value. If it is, you overwrite the variable with the lower value.
26th Dec 2019, 6:54 PM
HonFu
HonFu - avatar
+ 2
Don't give out full codes - students won't learn, and teachers will be sad!
26th Dec 2019, 7:09 PM
HonFu
HonFu - avatar
27th Dec 2019, 2:20 PM
THE CRAZY ONE ✌️
THE CRAZY ONE ✌️ - avatar
+ 1
Please show us your attempt.
26th Dec 2019, 6:49 PM
HonFu
HonFu - avatar
+ 1
HRITIK.DIYUNDI, why don't you show us your failed attempt?
26th Dec 2019, 7:10 PM
HonFu
HonFu - avatar
+ 1
Alright, and now the same with 100 values please.
26th Dec 2019, 7:19 PM
HonFu
HonFu - avatar
+ 1
Please give it a serious try with the method I explained before just letting other people do your work.
26th Dec 2019, 7:21 PM
HonFu
HonFu - avatar
+ 1
I gave you the method up there. Please try to implement it.
26th Dec 2019, 7:23 PM
HonFu
HonFu - avatar
+ 1
HonFu OK I try
26th Dec 2019, 7:25 PM
THE CRAZY ONE ✌️
THE CRAZY ONE ✌️ - avatar
+ 1
Mùķę§h, why don't you let him try now?
26th Dec 2019, 7:30 PM
HonFu
HonFu - avatar
+ 1
HRITIK.DIYUNDI , hi. You have to look at my code named minmax_2, if you want. Maybe it will help you.
27th Dec 2019, 6:41 PM
Maksat Ramazanov
Maksat Ramazanov - avatar
+ 1
Maksat Ramazanov Your code is In phyton And I am talking about C++ However Thanks for the suggestion
28th Dec 2019, 7:46 AM
THE CRAZY ONE ✌️
THE CRAZY ONE ✌️ - avatar
+ 1
Program
8th Mar 2023, 5:41 PM
Rana Abdullah Abdullah
Rana Abdullah Abdullah - avatar
0
I have no idea how to perform this program
26th Dec 2019, 6:51 PM
THE CRAZY ONE ✌️
THE CRAZY ONE ✌️ - avatar
0
would you please Create a program For this ? Bcoz i tried with loop but There is some place my condition become false ..
26th Dec 2019, 6:59 PM
THE CRAZY ONE ✌️
THE CRAZY ONE ✌️ - avatar
0
Ohk .
26th Dec 2019, 7:02 PM
THE CRAZY ONE ✌️
THE CRAZY ONE ✌️ - avatar
26th Dec 2019, 7:19 PM
THE CRAZY ONE ✌️
THE CRAZY ONE ✌️ - avatar
0
only for maximum value
26th Dec 2019, 7:20 PM
THE CRAZY ONE ✌️
THE CRAZY ONE ✌️ - avatar
0
HonFu i don't remember how to Perform with 100 values Can u give some idea please
26th Dec 2019, 7:22 PM
THE CRAZY ONE ✌️
THE CRAZY ONE ✌️ - avatar
0
Mùķę§h thanks
26th Dec 2019, 7:25 PM
THE CRAZY ONE ✌️
THE CRAZY ONE ✌️ - avatar