Sinux1

PS8Q4.cpp

May 3rd, 2016
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.31 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6.     string line;
  7.  
  8.     cout << "Enter a line of text\n";
  9.     getline(cin, line);
  10.  
  11.     for (int sub = 0; sub < line.length(); sub++)
  12.     {
  13.         line[sub] = toupper(line[sub]);
  14.         cout << line[sub];
  15.     }
  16.     cout << endl;
  17.     return 0;
  18. }
Add Comment
Please, Sign In to add comment