Rainrix2001

Reverse

Aug 19th, 2019
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.43 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3.     using namespace std;
  4.     int main () {
  5.         int ed, i=0;
  6.         string fullname;
  7.         system("cls");
  8.         cout << "Problem 3 - Program Reverse\n";
  9.         cout << "-----------------------------\n";
  10.         cout << "Enter Full Name: ";
  11.         getline (cin,fullname);
  12.         cout << "Your Full Name In Reverse: ";
  13.         ed = fullname.length();
  14.         while (ed!=i){
  15.             ed--;
  16.             cout << fullname[ed];
  17.         }
  18.         cout << "\n";
  19.         return 0;
  20.     }
Add Comment
Please, Sign In to add comment