2 like 0 dislike
250 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
| 250 views
Welcome to Peer-Interaction Programming Learning System (PIPLS) LTLab, National DongHwa University
English 中文 Tiếng Việt
IP:172.70.135.210
©2016-2023

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
| 227 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
| 195 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
| 223 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
| 202 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
| 209 views
15,223 questions
248,606 answers
221,221 comments
6,054 users