MichalWalczak

Zad 7

Mar 25th, 2020
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.31 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. char znak;
  6. int liczba;
  7.  
  8. void SZLACZEK(char z, int a){
  9. for(int i=1; i<=a; i++){
  10.  
  11. cout<<z;
  12.  
  13. }
  14.  
  15. }
  16.  
  17.  
  18.  
  19. int main()
  20. {
  21.     cout << "Podaj typ znaku i dlugosc szlaczka" << endl;
  22.     cin>>znak;
  23.     cin>>liczba;
  24.     SZLACZEK(znak, liczba);
  25.     return 0;
  26. }
Add Comment
Please, Sign In to add comment