Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<cstdlib>
- #include<ctime>
- #include<iostream>
- #define RAND_MAX 99
- using namespace std;
- int main()
- {
- int a=0, b=0, c, d;
- srand(time(0));
- for(c=0;c<1;)
- {
- cout << "Bitte geben Sie eine Zahl im Berreich von 1 bis " << RAND_MAX << " ein: ";
- cout << "Wollen sie weiter raten? <Y|N>" << endl;
- d=getchar();
- switch(d)
- {
- case 'Y': cout << "Case Y " << endl;
- break;
- case 'y': cout << "Case lil' y " << endl;
- break;
- case 'N': cout << "Das Programm wird nun beendet!" << endl;
- c++;
- break;
- case 'n': cout << "Case 'lil' n " << endl;
- cout << "Das Programm wird nun beendet!" << endl;
- c++;
- break;
- default: cout << "Default!" << endl;
- }
- }
- system("PAUSE");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement