+ 1

cin not working on mobile

Hi guys Im trying to solve the Bus Service Practice in c++.. Somehow the cin is not working / does not popup. Any Ideas, why this is not working? Cannot finish the practice without the cin function.

11th Jan 2023, 12:12 PM
soNa
soNa - avatar
11 Réponses
+ 2
soNa Weird. Tried your code, works for me on Android. The code doesn't work but the popup does. Does cin work for you for different problems? I assume yes as you've gotten this far. Maybe close the app restart and see if it still happens. If so you should email: info@sololearn.com and report it, could be a bug.
11th Jan 2023, 1:10 PM
Scott D
Scott D - avatar
+ 2
soNa are you creating the code under Sololearn's Web code editor instead of the C++ editor? That would be a good reason why it is not prompting you. In Sololearn, each language section Run command scans for language-specific keywords to determine whether to prompt for input before the run. When you create new code, select the appropriate language (in this case C++) when it prompts you for the language.
11th Jan 2023, 5:49 PM
Brian
Brian - avatar
+ 1
Please show your complete code so we can check on it.
11th Jan 2023, 12:48 PM
Lisa
Lisa - avatar
+ 1
soNa some persons in the past have made the mistake of choosing the wrong language to edit the code, and then wondered why it did not behave as desired. I thought I'd check, just in case it would help. It sounds like that is not the case here.
13th Jan 2023, 8:36 AM
Brian
Brian - avatar
0
Can you please specify the Practice Number. For Example : 2.1 or 4.3
11th Jan 2023, 12:32 PM
Prashant Narendra Solanki
Prashant Narendra Solanki - avatar
0
Number 11 : Code Project Transportation
11th Jan 2023, 12:43 PM
soNa
soNa - avatar
0
soNa You may need to copy your code and paste it here, or select Save As and insert it. Works fine for me on mobile phone. Perhaps you're making a syntax error. When you try to run the code is there a reported error?
11th Jan 2023, 12:50 PM
Scott D
Scott D - avatar
0
For example: if i put this code in Web Compiler Sololearn, the Cin Input popup showing up but not on the phone (ios) #include <iostream> using namespace std; int main() { //your code goes here int busTransport = 50; int waitingStation = 126; int emptySeats; int input; cin >> input; emptySeats = waitingStation -busTransport; cout << emptySeats; return 0; }
11th Jan 2023, 1:02 PM
soNa
soNa - avatar
0
Hi. Your variable (input) doesn't have any role in this code maybe because of this cin is not working. Also you have to calculate the number of passengers of the last bus by operator %. At the end, subtract the number of whole passengers From the number obtained in the previous step.
12th Jan 2023, 6:06 AM
M Zakeri
0
Brian What do you mean with creating the code under Web code editor instead C++ Editor? Is there a way to choose the Editor in the App? i open the App and choose my language C++ and start with the practice.
13th Jan 2023, 8:27 AM
soNa
soNa - avatar
0
soNa You wrote: "Is there a way to choose the Editor in the App? i open the App and choose my language C++ and start with the practice." I'm assuming by practice you mean c++ code practice 11 "Transportation". Don't know about ios, but with the Android app, when you open the app there's a tab at the bottom - Create. When you select that you can select "New Code", choose the language, and it launches an editor/compiler inside the app. You can create your own code or paste one in, for example one copied from a lesson or Code Coach. It allows you to get extra practice, as well as working on Code Coaches while having control of the input and a better view of the output console.
13th Jan 2023, 10:04 AM
Scott D
Scott D - avatar