Help me fix the problem in this code | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Help me fix the problem in this code

Largest number using array

16th Nov 2020, 4:27 AM
Anas kayani
Anas kayani - avatar
13 Answers
+ 3
Hi change cout<<"number= "<<i+1<<endl; cin>>work[i];} for cin>>work[i]; cout<<"number"<<i+1<<"="<<work[i]<<endl;}
16th Nov 2020, 5:30 AM
Mariano Fregosi
Mariano Fregosi - avatar
16th Nov 2020, 5:40 AM
Mariano Fregosi
Mariano Fregosi - avatar
+ 2
https://code.sololearn.com/cwETRG10IKrt/?ref=app
16th Nov 2020, 11:09 AM
Dr£@M_c@tcH£r
Dr£@M_c@tcH£r - avatar
+ 2
Please try this modified code
16th Nov 2020, 11:09 AM
Dr£@M_c@tcH£r
Dr£@M_c@tcH£r - avatar
+ 2
Thanks alot guys
16th Nov 2020, 11:39 AM
Anas kayani
Anas kayani - avatar
16th Nov 2020, 4:28 AM
Anas kayani
Anas kayani - avatar
+ 1
The largest number given is incorrect
16th Nov 2020, 4:31 AM
Anas kayani
Anas kayani - avatar
+ 1
In this case ,it is not printing desired numbers
16th Nov 2020, 4:34 AM
Anas kayani
Anas kayani - avatar
+ 1
I want that it should print the numbers that are given as input .like 1,4,6,5,2,3 In this case.but the numbers printed are 1,2,3,4,5,6
16th Nov 2020, 4:38 AM
Anas kayani
Anas kayani - avatar
+ 1
Can you send the link of code
16th Nov 2020, 5:36 AM
Anas kayani
Anas kayani - avatar
0
This code works for me.
16th Nov 2020, 4:29 AM
你知道規則,我也是
你知道規則,我也是 - avatar
0
I input 1 4 6 5 2 3 and it shows 6.
16th Nov 2020, 4:32 AM
你知道規則,我也是
你知道規則,我也是 - avatar
0
What is the the number you desire?
16th Nov 2020, 4:36 AM
你知道規則,我也是
你知道規則,我也是 - avatar