[SOLVED] CS2092D Assignment 0

30.00 $

Category:
Click Category Button to View Your Next Assignment | Homework

You will receive the following solution file(s) instantly after successful payment:

zip file icon ASSIGNMENT0-rz034y.zip (92.9 KB)
Assignment Instructions Updated Recently? Submit Below and we will provide new Solution!
Submit New Instructions
🔒 Securely Powered by:
Secure Checkout
5/5 - (1 vote)

QUESTIONS

1. Write a C program to check whether an input integer number is palindrome or not.

Input format:

• Theinputisanintegern∈[0,105]. Output format:

• If the integer is palindrome, print YES.
• If the integer is not palindrome, print NO.

Sample Input 1: 1221 Sample Output 1: YES Sample Input 2: 1225 Sample Output 2:NO

2. Write a C program to count how many palindromes are present in a given array of integers. Pro- gram must have a separate function PALINDROME(int) to check whether an integer is palindrome.

Input format:

• The first line of the input contains an integer n ∈ [0, 104 ], the size of the array A.
• ThesecondlineliststhenelementsinA,asspace-separatedintegersintherange[−1000,1000].

Output format:

• An integer indicating the count of palindromes in the input array

Sample Input 1:

7
25 55 75 101 131 215 252

Sample Output 1:

4

Sample Input 2:

5
10 35 65 123 155

Sample Output 2:

0

2

  • ASSIGNMENT0-rz034y.zip