The code reverses the statement but it doesn't make the uppercase letters lowercase. I'm pretty new to coding and would appreciate some help, thanks! :
#include<iostream>
#include<cstring>
using namespace std;
int main ()
{
char str[50], temp;
int i, j, x;
cout << "Enter a string : ";
gets(str);
j = strlen(str) - 1;
int size = strlen(str)-1;
for (x=0;x<=size;x++){
if (str[x]>'z'){
str[x]+'32';
}
}
for (i = 0; i < j; i++,j--)
{
temp = str[i];
str[i] = str[j];
str[j] = temp;
}
cout << "\nReverse string : " << str;
return 0;
}