Kasamundo

Ilosc mnozen

Dec 4th, 2019
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.47 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     int num, x;
  8.     cout<<"--------------------"<<endl;
  9.     cout<<"    Ilosc mnozen    " <<endl;
  10.     cout<<"--------------------"<<endl;
  11.     cout<<"Milosz Skarzynski"<<endl;
  12.     cout<< ""<<endl;
  13.     cout<<"Podaj ilosc liczb: ";
  14.     cin>>num;
  15.     if(num<1) cout<<"Ilosc liczb musi byc wieksza niz jeden";
  16.     else {
  17.     x=(num*num)-num;
  18.     cout<<"Ilosc mnozen kazdy z kazdym: " << x;
  19.     }
  20.     return 0;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment