0
How to construct ac++ program that will read up to ten(10) letters into an array.
write the letter back to the screen in the reverse order. use a period as sentinel value to make the end of the input. For example ,if the input is Happy then the output should be yppaH
3 Answers
0
int a[100];
int i=0;
for (i=0;i<=9;i++)
{
cin>>a[i];
}
0
ooo.
0
Sry I got the whole exercise wrong.
First you input in a char array, like Rishabhs' code is doing it (grr for printing complete solutions) reverse it by going through I=9 to 0 in your input array and add the chars to your result string then output.