RafalSobala

zad 12

Mar 30th, 2020
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.26 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int a,b;
  6.  
  7. void KWADRAT(int a)
  8. {
  9.     b=a*a;
  10.     for (int i=b;i>0;i--){
  11.         cout << "*, ";
  12.     }
  13. }
  14.  
  15. int main()
  16. {
  17.     cout << "Podaj liczbe: " << endl;
  18.     cin >> a;
  19.  
  20.     KWADRAT(a);
  21.  
  22.     return 0;
  23. }
Add Comment
Please, Sign In to add comment