Advertisement
Felanpro

IO Functions

Jan 18th, 2016
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.56 KB | None | 0 0
  1. //IO Functions
  2. //Erase the comment symbols to execute/reveal the code!
  3.  
  4. #include "stdafx.h"
  5. #include <iostream>
  6. #include <iomanip>
  7. #include <string>
  8. using namespace std;
  9.  
  10. int main()
  11. {
  12.     /*
  13.     float x = 4.19;
  14.  
  15.     cout << setprecision(4) << x << endl;
  16.     */
  17.  
  18.     /*
  19.     int x(0);
  20.     int y(0);
  21.  
  22.     cin >> x >> y;
  23.  
  24.     cout << x << " " << y;
  25.     */
  26.  
  27.     /*
  28.     int x(0), result(0);
  29.  
  30.     while (cin >> x)
  31.     {
  32.         result += x;
  33.     }
  34.  
  35.     cout << result;
  36.     */
  37.  
  38.     /*
  39.     string x;
  40.  
  41.     cin >> x;
  42.  
  43.     cout << x;
  44.     */
  45.  
  46.     /*
  47.     string x;
  48.  
  49.     getline(cin, x);
  50.  
  51.     cout << x;
  52.     */
  53.  
  54.     return 0;
  55. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement