Advertisement
HakdogForce

Untitled

Oct 29th, 2018
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main(){
  5.  
  6.  
  7. int x, b, a;
  8. cout << "Enter a numbers of B: ";
  9. cin >> b;
  10. cout << "Enter a numbers of A: ";
  11. cin >> a;
  12. cout << "\n";
  13. for(int i = 1; i <= b; b++){
  14. cout << "B";
  15. for(int i = 1; i <= a; a++){
  16. cout << "A";
  17. }
  18.  
  19. cout << "\n\nEnter another? [1] YES [2] NO: ";
  20. cin >> x;
  21.  
  22. if(x == 1){
  23. system("cls");
  24. cout << "\n";
  25. return main();
  26. }
  27. if(x == 2 || x > 2){
  28. system("pause");
  29.  
  30. }
  31. cout << "Program Ends, Happy Programming!!!";
  32. return 0;
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement