/*
* Reverse words in a sentence
*/
#include <iostream>
#include <cstring>
int main(){
// normal string
std::string n = "Join the NAVY";
// reversed string
std::string r;
// for to loop through normal string from end to begin
for(int i = (n.size() - 1); i >= 0; i --){
r += n[i]; // appends char at s[i] to r string
}
std::cout << n << '\n'; // normal string
std::cout << r << '\n'; // reversed string
return 0;
}