Computer Science, asked by sunnyemmanuel4788, 10 months ago

Help Kiara in reversing a string Please help Kiara to write the correct code to reverse a string.

Answers

Answered by Anonymous
0

Answer:

its a python code

Explanation:

s=str(input("enter the string"))

rev=s[::-1]

print(rev,"is the reversed string")

#hope it helps you

please mark brainliest

Answered by MSFLAB3
10

Answer:

#include <iostream>

int main()

{

char str[100], rev[100];      

int count = 0, end, i;    

std::cin.getline(str,100);

for(i=0;str[i]!='\0';i++)

{

 count++;

}

end=count;

for(i=0;i<end;i++)

{

 rev[i]=str[count-1];

 count--;

}

std::cout<<rev;          

}

Similar questions