Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- string toString(int x) {
- if (x < 10) {
- return string() + (char) (x + '0');
- }
- return "10";
- }
- int main() {
- for (int i = 1; i <= 10; i++) {
- ifstream input("input" + toString(i) + ".txt");
- ofstream output("output" + toString(i) + ".txt");
- int x;
- input >> x;
- output << x << endl;
- input.close();
- output.close();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement