+ 1

I can't get the output of this(link below) code I need a solution.

https://code.sololearn.com/cOV0R47NiKwi/?ref=app

1st Mar 2020, 10:32 AM
MAMTA CHAUDHARI
MAMTA CHAUDHARI - avatar
5 Réponses
+ 1
SoloLearn doesn't support multiple input so your code will not work here. At line 13 just write int c; There is no use of Scanner since you are changing and assigning its value in next line. You can put you a = S.nextInt() after the System.out.println("Enter A....") because you code will print both enter value of A enter values of B and then take the input
1st Mar 2020, 10:35 AM
Utkarsh Sharma
Utkarsh Sharma - avatar
+ 1
int c=S.nextInt(); For c, you don't need to take input, since you calculating, result and putting it in c. So Just put, int c;
1st Mar 2020, 10:37 AM
Jayakrishna 🇮🇳
+ 1
Utkarsh Sharma You can give multiple inputs. But just need to give all at once by space separating or in new line.. So that code works perfectly.. May be you not noticed it, so Just for the information telling you...,
1st Mar 2020, 10:42 AM
Jayakrishna 🇮🇳
+ 1
Thank you guys for your help Now my code is working
1st Mar 2020, 10:43 AM
MAMTA CHAUDHARI
MAMTA CHAUDHARI - avatar
0
Jayakrishna Okay! And Thanks... I hadn't noticed this. But it still is inconvenient for my projects.
1st Mar 2020, 10:43 AM
Utkarsh Sharma
Utkarsh Sharma - avatar