Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- ifstream fin("pozitiiconsecutive.in");
- ofstream fout("pozitiiconsecutive.out");
- unsigned long long x, y, z;
- int main()
- {
- fin>>x>>y;
- z=2*x-y+2;
- fout<<y<<" "<<x<<" "<<z<<" ";
- while(z)
- {
- y=x;
- x=z;
- z=2*x-y+2;
- fout<<z<<" ";
- }
- return 0;
- }
Add Comment
Please, Sign In to add comment