Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- #define FOR(i, k, n) for(int i = (k); i < (n); i++)
- #define DFOR(i, k, n) for(int i = (k); i > (n); i--)
- #define SZ(a) int((a).size())
- #define FA(i, v) FOR(i, 0, SZ(v))
- #define RFA(i, v) DFOR(i, SZ(v), 0)
- #define ll long long
- #define endl '\n'
- #define MAX_INT 2147483647
- #define fi first
- #define se second
- #define fo(x) {freopen(#x".in","r",stdin);freopen(#x".out","w",stdout);}
- #define fstd {freopen("input.txt","r",stdin);freopen("output.txt","w",stdout);}
- string st = "0123456789";
- string toString(int a){
- string out = "";
- while(a){
- out = st[a % 10] + out;
- a /= 10;
- }
- return out;
- }
- int main()
- {
- ifstream inp;
- string p;
- FOR(i, 1, 4){
- inp.open(toString(i) + ".txt");
- inp >> p;
- cout << p << '\n';
- inp.close();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement