0

During code in c++ 'If cin is entered then why after runing it does not ask for input

17th Aug 2018, 6:36 AM
Somil Porwal
Somil Porwal - avatar
8 Réponses
+ 4
Don't know exactly what's the issue until you don't post your code. But I am considering that you have included iostream library You can try using fflush(stdin) before cin
17th Aug 2018, 8:13 AM
blACk sh4d0w
blACk sh4d0w - avatar
0
Somil Porwal share your code. this may help us to check issue into it if any
17th Aug 2018, 7:04 AM
Ketan Lalcheta
Ketan Lalcheta - avatar
0
Post your code. My guess is you could have forgotten to import <iostream> library or to import standard namespace (using namespace std;) <iostream> is required, but i you don't want to use the standard namespace, use std::cin instead of cin :)
17th Aug 2018, 7:06 AM
MarJan
MarJan - avatar
22nd Aug 2018, 9:35 AM
Somil Porwal
Somil Porwal - avatar
0
i posted my code please tell me my mistakes
22nd Aug 2018, 9:36 AM
Somil Porwal
Somil Porwal - avatar
0
thanks for the help
22nd Aug 2018, 9:44 AM
Somil Porwal
Somil Porwal - avatar
0
Somil Porwal I checked and it works perfectly fine... on sololearn app for c++, you need to provide all input in one go either seperated by space or new line (enter)... for your case, provide input 12 3 (first input value space second input value) and check results
22nd Aug 2018, 11:48 AM
Ketan Lalcheta
Ketan Lalcheta - avatar
0
thanks ketan
22nd Aug 2018, 12:36 PM
Somil Porwal
Somil Porwal - avatar