Advertisement
Guest User

Untitled

a guest
Mar 21st, 2019
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.88 KB | None | 0 0
  1. #include "pch.h"
  2. #include <iostream>
  3. #include <string>
  4. #include <cmath>
  5.  
  6. using namespace std;
  7.  
  8. int main()
  9. {
  10.     cout << 2.0 / 7.0 + 3.0 << endl;
  11.  
  12.     cout << sqrt(145) + 3 / 7 << endl;      // Pierwiastkowanie
  13.  
  14.     cout << pow(2, 7) << endl;              // Potęgowanie
  15.  
  16.     cout << abs(123) << endl;               // Wartość bezwzględna
  17.  
  18.     cout << 2 / 7 << endl;
  19.     cout << 2 % 7 << endl;
  20.  
  21.  
  22.  
  23.  
  24.     int liczba1;
  25.  
  26.     liczba1 = 10;
  27.  
  28.     liczba1 = liczba1 + 1;
  29.     cout << liczba1 << endl;
  30.     liczba1++;
  31.     cout << liczba1 << endl;
  32.     ++liczba1;
  33.     cout << liczba1 << endl;
  34.  
  35.  
  36.     int liczba2 = 20;
  37.  
  38.     cout << liczba2++ << endl;
  39.     cout << liczba2 << endl;
  40.  
  41.  
  42.     int liczba3 = 30;
  43.  
  44.     cout << ++liczba3 << endl;
  45.     cout << liczba3 << endl;
  46.  
  47.  
  48.     int liczba4 = 40;
  49.  
  50.     cout << liczba4-- << endl;
  51.     cout << liczba4 << endl;
  52.  
  53.  
  54.     int liczba5 = 50;
  55.  
  56.     cout << --liczba5 << endl;
  57.     cout << liczba5 << endl;
  58.    
  59.  
  60.  
  61.     return 0;
  62. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement