Help 3 | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
29th Oct 2018, 11:20 AM
Cursed Cat
Cursed Cat - avatar
2 ответов
0
if i could only send a picture but it has to find the lowest and highest number for example 1 2 3 4 5 lowest: 1 highest:5
29th Oct 2018, 11:35 AM
Cursed Cat
Cursed Cat - avatar
0
OK ok. Try with this: #include <iostream> using namespace std; int main() { int i,n,largest,smallest; i=1; largest=0; smallest=9999; cout<<"Kindly please enter your integer, thank you: \n\n"; do{ cin>>n; if(n>largest) largest=n; if(n<smallest) smallest=n; i++; } while(i<6); cout<<"The largest number is: "<<+ largest <<endl; cout<<"The smallesr number is: "<<+ smallest << endl; return 0; }
29th Oct 2018, 11:47 AM
Ramphy Aquino Nova
Ramphy Aquino Nova - avatar