Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //921
- #include <cstdio>
- int main(void) {
- FILE* fin = fopen("input.txt", "r");
- FILE* fout = fopen("output.txt", "w");
- int a, b;
- fscanf(fin, "%d%d", &a, &b);
- fclose(fin);
- if (a > 0 || a < 0 && b % 2 == 0)
- fprintf(fout, "1\n");
- else if (a == 0)
- fprintf(fout, "0\n");
- else
- fprintf(fout, "-1\n");
- fclose(fout);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement