Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
random lotto number game
//Samuel Ugochukwu //Random number Lotto game //10 june 2017 #include <iostream> #include <cstdlib> #include <ctime> using namespace std; int main() { int num; int random; cout<<"¤¤SAMUEL RANDOW NUMBER LOTTO¤¤\n\n"; cout<<"\n¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤"; cout << "\n\nPICK A NUMBER BETWEEN 0 and 10 : \n"; cin>>num; cout<<"\nYOU ENTERED: "<<num<<"\n"; srand(time(0)); random = rand()%10; if(num >10) { cout<<"\nINVALID NUMBER"<< "\nHints: between 0 and 10"; } else if (num == random) { cout<<"\nYOU ARE A WINNER: " <<random<<" IS CORRECT\n\n"; } else { cout<<"\nOps you don't get it right.... Try again"; cout<<"\n\nYou Pick: "<<num<<" The Right Number is: "<<random; } }
run
|
edit
|
history
|
help
0
Good1
PrintShape
Cley
Days in month database using unordered_map
Operation on Set Container
selection_sort
Const Return Test
unordered_map
Empty C++ Script
pointconcat