Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <fstream>
- #include <iostream>
- using namespace std;
- int i,x,n;
- int main()
- {
- ifstream fi("max.in");
- ofstream fo("max.out");
- cin>>n;
- for(i=1;i<=n;i++)
- {
- if(i%2) x=-1; else x=1;
- x*=(((i-1)%3)+1);
- fo<<x<<" ";
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment