#include "stdafx.h"
#include <iostream>
#include <iomanip>
#include <string>
using namespace std;
char your_string[256];
char new_string[256];
void ReverseString();
int main()
{
char choice;
do
{
cout <<"Enter the string that you want to reverse: \n";
cin.getline(your_string, 256);
ReverseString();
cout << new_string << "\n";
cout <<"Do you want to continue? Press e to exit: ";
cin>>choice;
}
while (choice != 'e');
return 0;
}
void ReverseString()
{
int x = strlen(your_string)-1;
for(int y = x; y >= 0; y--)
{
new_string[x-y] = your_string[y];
}
}
I need the program to repeat it self. thanks