Advertisement
Raqeeb_Alnakib

C++ Input & Output Operations & Usage Of Operators & String

Oct 22nd, 2019
12,690
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.72 KB | None | 0 0
  1. /*
  2.  
  3. Please, Don't Miss Visit My Site:
  4.  
  5.  
  6. https://global-prog.com
  7.  
  8.  
  9. */
  10.  
  11.  
  12.  
  13. #include <iostream>
  14. #include <string>
  15.  
  16. \\Output
  17.  
  18.  
  19. void main()
  20. {
  21.         std::cout << 10+5-14 << "\n";
  22.         std::cout << (10*25)-40 << "\n";
  23.         std::cout << (10/10)+9 << "\n";
  24.     return;
  25. }
  26.  
  27. \\Input & Output
  28.  
  29.  
  30. void main()
  31. {
  32.     int x , y;
  33.     std::cout << "Input the x value : ";
  34.     std::cin >> x;
  35.         std::cout << "Input the y value : ";
  36.         std::cin >> y;
  37.     std::cout << "The x value is : " << x << "\n";
  38.         std::cout << "The y value is : " << y << "\n";
  39.     return;
  40. }
  41.  
  42. \\ Strings
  43.  
  44. int main()
  45. {
  46.     std::string x;
  47.     std::cout << "Enter any string text : ";
  48.     std::cin >> x;
  49.     std::cout << "Your string text is : " << x << "\n";
  50. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement