MeehoweCK

Untitled

Mar 5th, 2021
618
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     int a, b;       // deklaracja dwóch zmiennych typu int
  8.     cout << "Podaj dwie liczby calkowite: ";
  9.     cin >> a >> b;      // wejście wartości z konsoli (wprowadzenie wartości do zmiennych)
  10.     cout << "a = " << a << endl;
  11.     cout << "b = " << b << endl;
  12.  
  13.     cout << a << " + " << b << " = " << a + b << endl;
  14.     cout << a << " - " << b << " = " << a - b << endl;
  15.     cout << a << " * " << b << " = " << a * b << endl;
  16.     cout << a << " / " << b << " = " << 1.0 * a / b << endl;  // jeżeli dzielimy przez siebie dwie liczby całkowite, to wynik będzie całkowity !!!
  17.     cout << a << " % " << b << " = " << a % b << endl;
  18.  
  19.     return 0;
  20. }
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×