Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main(){
- int x, a;
- cout << "Enter a number from 1 to 10: ";
- cin >> x;
- cout << "\n";
- for(int i = 1; i <= 10; i++){
- if (i == x){
- cout << "Dong";
- continue;
- }
- cout << "Ding";
- }
- cout << "\n\nEnter another? [1] YES [2] NO: ";
- cin >> a;
- if(a == 1){
- system("cls");
- cout << "\n";s
- return main();
- }
- if(a == 2 || a > 2){
- system("pause");
- }
- cout << "Program Ends, Happy Programming!!!";
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement