2 like 0 dislike
118 views
Write a program that reads 10 integers and stores them in an array. Then, the pro­gram should check if the array is symmetric, that is, if the value of the first element is equal to the last one, the value of the second one equal to the value of the last but one, and so on. If it's symmetric, print "Yes", else print "No"

Sample Input 1:

1 2 3 4 5 5 4 3 2 1

Sample Output 1:

Yes

Sample Input 2:

1 2 3 4 5 5 5 5 2 1

Sample Output 2:

No

 

References: C From Theory
[Normal] Coding (C) - asked in Introduction to Computer Programming I (C) by (20.9k points)
ID: 21878 - Available when: Unlimited - Due to: Unlimited
| 118 views
Welcome to Peer-Interaction Programming Learning System (PIPLS) LTLab, National DongHwa University
English 中文 Tiếng Việt
IP:172.70.131.216
©2016-2024

Related questions

3 like 0 dislike
0 answers
[Normal] Coding (C) - asked Feb 8, 2017 in Introduction to Computer Programming I (C) by The Contributor (20.9k points)
ID: 21874 - Available when: Unlimited - Due to: Unlimited
| 89 views
2 like 0 dislike
0 answers
[Normal] Essay (Open question) - asked Feb 8, 2017 in Introduction to Computer Programming I (C) by The Contributor (20.9k points)
ID: 21880 - Available when: Unlimited - Due to: Unlimited
| 95 views
3 like 0 dislike
0 answers
[Normal] Coding (C) - asked Feb 8, 2017 in Introduction to Computer Programming I (C) by The Contributor (20.9k points)
ID: 21876 - Available when: Unlimited - Due to: Unlimited
| 86 views
3 like 0 dislike
0 answers
[Normal] Essay (Open question) - asked Feb 8, 2017 in Introduction to Computer Programming I (C) by The Contributor (20.9k points)
ID: 21875 - Available when: Unlimited - Due to: Unlimited
| 115 views
3 like 0 dislike
0 answers
[Normal] True/False - asked Feb 11, 2017 in Introduction to Computer Programming I (C) by The Contributor (20.9k points)
ID: 21918 - Available when: Unlimited - Due to: Unlimited
| 109 views
12,783 questions
183,443 answers
172,219 comments
4,824 users