Advertisement
MeehoweCK

Untitled

Nov 12th, 2022
717
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.51 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. /* TYPY ZMIENNYCH w C++
  6.  
  7. int, short, long long - liczby całkowite
  8. unsigned - liczby naturalne
  9. float, double - liczby rzeczywiste (zmiennoprzecinkowe)
  10. bool - prawda lub fałsz
  11. char - znak
  12. string - ciąg znaków*
  13.  
  14. * string nie jest podstawowym typem zmiennych, ale klasą
  15.  
  16. */
  17.  
  18. int main()
  19. {
  20.     cout << "Jak masz na imie? ";
  21.     string imie;
  22.     cin >> imie;
  23.    
  24.     cout << "Ile masz lat? ";
  25.     short wiek;
  26.     cin >> wiek;
  27.    
  28.     return 0;    
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement