2 like 0 dislike
247 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
| 247 views
Welcome to Peer-Interaction Programming Learning System (PIPLS) LTLab, National DongHwa University
English 中文 Tiếng Việt
IP:172.70.100.182
©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
| 194 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
| 194 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
| 204 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
| 208 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
| 217 views
12,783 questions
183,443 answers
172,219 comments
4,824 users