We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3985938 commit c7033a1Copy full SHA for c7033a1
challenge_1/cpp/alexbotello/README.md
@@ -0,0 +1,5 @@
1
+# Reverse String
2
+###### Language Version (C++ 11)
3
+
4
+We use a For loop to iterate through the string starting at the last element.
5
+At each element print the output.
challenge_1/cpp/alexbotello/src/main.cpp
@@ -0,0 +1,19 @@
+#include <iostream>
+#include <string>
+using namespace std;
+int main()
6
+{
7
+ string input;
8
9
+ cout << ">: ";
10
+ getline(cin, input);
11
12
+ for (int i = input.length(); i >= 0; i--)
13
+ {
14
+ cout << input[i];
15
+ }
16
+ cout << endl;
17
18
+ return 0;
19
+}
0 commit comments