Created
October 25, 2018 17:54
-
-
Save Appendme/3065000f54f829a9a6fd74272402599b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <fstream> | |
#include <vector> | |
int main() | |
{ | |
std::ifstream input("input.txt"); | |
std::vector<std::string> strings; | |
std::string temp; | |
while (input >> temp) | |
{ | |
strings.push_back(temp); | |
} | |
while (strings.size()) | |
{ | |
std:: cout << strings.back() << " "; | |
strings.pop_back(); | |
} | |
std::cout << std::endl; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment