Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion Projects/C++ Projects/Basic/Guessing Game/text.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,14 @@
using namespace std;
int main()
{
// here in commits max_h=99 not h=100 because here h could be (random%100)-> [0-99] so h will be 99 not h = 100
// to make h til 100 we need to find mod with 101 not 100
int attemp = 1,ans,guess=0,_won=0,h=100,l=0;
srand(time(0));
ans = rand() % 100;
// old line ans = rand() % 100;
// new commit or new line
ans = rand() % 101;
// change ( rand() % 100 )to (rand() % 101)
cout<<"**** PLEASE READ INSTRUCTION ****"<<endl<<endl;
cout << "NemoNet will generate"<<endl<<"any random number between 0-100"<<endl;
cout<<"you have to guess the number"<<endl<<"you have 5 attempts / chanses to guess"<<endl<<endl;
Expand Down