Académique Documents
Professionnel Documents
Culture Documents
Create a Program that will require a user to enter a number and reverse the digits of it and add the
resulting number to the original number entered by the user. If the output of result is not a
palindrome, repeat the process. In the example below, start with 78. Affecting this process, we
obtain:
78 + 87 = 165
165 + 561 = 726
726 + 627 = 1353
1353 + 3531 = 4884, a palindrome
OUTPUT: Display all the occurrences acquired in the addition process. Print the
palindrome produced. If the produced sum is not palindrome after 10 additions, the
program will display that it did not found any palindrome sum.
SAMPLE INPUT 1
SAMPLE OUTPUT 1
SAMPLE INPUT 2
SAMPLE OUTPUT 2
PROBLEM 2
Write a program that will generate an inverted numbers ladder. The user is required to enter any
positive integer that is not greater than 100. The output must be displayed in a single dialog box,
not in a terminal window.
SAMPLE INPUT
Enter an integer: 5
SAMPLE OUTPUT
5 4 3 2 1
4 3 2 1
3 2 1
2 1
1
PROBLEM 3
Write a program to multiply two matrices of the same size. The user will enter the size of the two
matrices and the elements of these matrices.
SAMPLE INPUT
SAMPLE OUTPUT
11 16
19 28
PROBLEM 4
1. BACKGROUND:
A waste management unit is looking for a developer who can develop system app that
can segregate the waste in the area. Let a string be the waste and the characters as the
classifications.
SPECIFICATION:
The input is composed of upper case, lower case, special characters, integers, and
spaces. The system will segregate and count the number of upper case, lower case, special
characters, integers and spaces. Another feature of it is that it automatically gets the sum of the
integers in the input.