Advertisement
wiktormadera

zad7

Apr 2nd, 2020
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.42 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4. {
  5.     for(int i=1; i<=dlugosc; i++)
  6.     {
  7.         cout << a;
  8.     }
  9. }
  10. int main()
  11. {
  12.     char a;
  13.     int dlugosc;
  14.  
  15.     cout << "Podaj dlugosc: " << endl;
  16.     cin >> dlugosc;
  17.     if(dlugosc<0)
  18.     {
  19.         cout << "Dlugosc nie moze byc ujemna.";
  20.         return 0;
  21.     }
  22.     cout << "Podaj znak: " << endl;
  23.     cin >> a;
  24.     szlaczek(dlugosc,a);
  25.     return 0;
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement