Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- #include <math.h>
- int main() {
- system("cls");
- //INPUT - @STUDENT:ADD YOUR CODE FOR INPUT HERE:
- int x, y;
- int a[100];
- int check = 1;
- scanf("%d", &x);
- for (int i = 0; i<x; i++) {
- scanf("%d", &a[i]);
- }
- y = x/2;
- for (int i = 0; i<= y; i++) {
- if (a[i] != a[x-1-i]) {
- check = 0;
- break;
- }
- }
- // Fixed Do not edit anything here.
- printf("\nOUTPUT:\n");
- //@STUDENT: WRITE YOUR OUTPUT HERE:
- printf("%d", check);
- //--FIXED PART - DO NOT EDIT ANY THINGS HERE
- printf("\n");
- system ("pause");
- return(0);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement