Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream.h>
- #include <conio.h>
- void T(char ,int);
- void main ()
- {
- char L;
- int M;
- L: cout << "\nEnter a character: ";
- cin >> L;
- cout << "Enter number of times to repeat it: " ;
- cin >> M;
- T(L,M);
- goto L;
- getch();
- }
- void T(char ch, int n)
- {
- for (int j = 0; j < n; j++)
- cout << ch ;
- cout << endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement