0
playground input
#include <iostream> #include <cstdlib> using namespace std; int main() { srand(time(0)); int random = rand() % 101; int tries = 10; int pin ;// player's input cout<<"Guss the number between 0 to 100! "<< endl<<"you got 10 tries \n"; while(tries > 0){ if(pin != random){ if(pin > random){ cout<<"Higher!" << endl; tries--; cout<<"tries left: "<< tries; } } } that is my code i tried to add an input multiple times in if statment but didnt work does anyone know how to use the playground
6 ответов
+ 5
you have to put all input in at once
in your case, you have to insert all 10 guesses at once
+ 1
كندة قد نسيتِ
cin>> pin;
وأيضًا
}
آخر شي
+ 1
هذه طريقة عمله هنا؛ إن أردت هذا كومبايلر اونلاين
https://www.onlinegdb.com/online_c++_compiler
0
cin>>
0
The game needs more than one input that you have to know what is the output like you need a lower number or higher or you guessed it hope you understood i am bad at explaining
0
المشكلة مش اني نسيت بس ما بقدر استعملها الا اول م يكبس run