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

7th Aug 2025, 9:21 PM
Kinda Alqassem
Kinda Alqassem - avatar
4 Respuestas
+ 3
you have to put all input in at once in your case, you have to insert all 10 guesses at once
8th Aug 2025, 12:13 AM
「HAPPY TO HELP」
「HAPPY TO HELP」 - avatar
0
cin>>
8th Aug 2025, 7:22 AM
Pat
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
8th Aug 2025, 10:11 AM
Kinda Alqassem
Kinda Alqassem - avatar
0
كندة قد نسيتِ cin>> pin; وأيضًا } آخر شي
8th Aug 2025, 11:59 AM
**🇦🇪|🇦🇪**
**🇦🇪|🇦🇪** - avatar