+ 1

How to take input in compiler in solo learn?

I'm coding a program in c++, which needs to take an input from the user, after I run it I'm unable to take the input from the user... Why??? Plz help... Thanks

8th May 2017, 4:21 AM
Mahender Rao
Mahender Rao - avatar
6 Answers
+ 4
You can't do the modulus of 0 in your code, you should do the modulus of 1 instead (you can't divide by 0) That will fix the problem
8th May 2017, 4:46 AM
Jeroen
Jeroen - avatar
+ 4
You're welcome ;)
8th May 2017, 4:50 AM
Jeroen
Jeroen - avatar
+ 3
cin >> variable or the getline function
8th May 2017, 4:38 AM
Jeroen
Jeroen - avatar
+ 1
Actually i thought it'd select the percentage from 0-100.. So I put it like that.. 🎉 Got it.. Thank you soo much😊😊
8th May 2017, 4:50 AM
Mahender Rao
Mahender Rao - avatar
+ 1
Try out my program 😊
8th May 2017, 4:52 AM
Mahender Rao
Mahender Rao - avatar
0
I used it... Just have a look at my code https://code.sololearn.com/cBQNkMUsKrZn/?ref=app
8th May 2017, 4:40 AM
Mahender Rao
Mahender Rao - avatar