Fork, Commit, Merge - Easy Issue 4 (C++)
nikohoffren opened this issue · comments
Fork, Commit, Merge - Easy Issue 4 (C++)
Reverse a String
Note: You don't have ask permission to start solving the issue or get assigned, since these issues are supposed to be always open for new contributors. The actions-user bot will reset the file back to previous state for the next contributor after your commit is merged. So you can just simply start working with the issue right away!
Navigate to the tasks/c++/easy
directory from the root of your project.
Then open a file called ReverseString.cpp
.
Description:
Your task is to create a C++ program that reverses a given string and prints it out to the console. The program should ask the user for input.
Requirements:
- Ask the user for a string.
- Reverse the string without using any built-in functions for reversing a string.
- Output the reversed string.
Example Output:
Input:
Enter a string: HelloWorld
Output:
Reversed string: dlroWolleH
How to run:
To test the program you have to first compile it by running:
g++ -o tasks/c++/easy/ReverseString tasks/c++/easy/ReverseString.cpp
Then you can run the compiled program by running:
tasks/c++/easy/ReverseString
If the program works as requested in the task, you are ready to make a pull request!
To work with this issue, you need to have C++ installed to your local machine.
Check out README.md for more instructions of installing C++ and how to make a pull request.
Feel free to ask any questions here if you have some problems!