Group 1 Question
1. Write a C++ program to instantly convert a given Ge’ez number to Latin-Arabic number
and vice versa. E.g. when the user type ፩ the equivalent 1should be displayed and for ፲=፪, 12
should be displayed.
2. Write a C++ program to encrypt and decrypt the entered word using a most common
cypher encryption taking a key “LOVE JAVA”.
E.g. Input= Abey Bekele with Key LOVE JAVA (show them how to do so).
3. Write a program that displays the following two tables side by side (note that 1 kilogram
is 2.2pounds):
4. Write a program that takes balance of a user’s account as input. It should then ask the user
how much amount he wants to withdraw from his account. The program should take this
amount as input and deduct from the balance. Similarly it should ask the user how much
amount he wants to deposit in his account. It should take this amount as input and add to the
balance. The program shall display the new balance after amount has been withdrawn and
deposited.
Note: Your program should have a check on balance and amount being withdrawn.
Amounts greater than balance cannot be withdrawn i.e. balance cannot be
negative.
Group 2 Question
1. Write a program that reads an unspecified number of integers, determines how many positive
and negative values have been read, and computes the total and average of the input values
(not counting zeros). Your program ends with the input 0. Display the average as a floating-
point number. Here is a sample run:
2. Write a C++ program to sort entered Roman numbers. I II III IV V VI VII VIII IX X
XX XXX XL L LX LXX LXXX XC C. These numbers should be unsorted in the file.
3. Write a program that prompts the user to enter an integer from1to15and displays a
pyramid, as shown in the following sample run:
A.
B.
5
454
34543
2345432
123454321
2345432
34543
454
5
4. Write a program for the following numerical game: The computer stores a random
number between 1 and 15 and the player (user) attempts to guess it. The player has a
total of three attempts. After each wrong guess, the computer tells the user if the
number was too high or too low. If the third attempt is also wrong, the number is output
on the screen. The player wins if he or she can guess the number within three attempts.
The player is allowed to repeat the game as often as he or she wants.
Group 3 Question
1. Write a program that reads integers, finds the largest of them, and counts its occurrences.
Assume that the input ends with number0. Suppose that you entered 352555 0; the
program finds that the largest is 5and the occurrence count for 5 is 4.
2. Write a program that reads in ten numbers and displays distinct numbers (i.e., if a number
appears multiple times, it is displayed only once). Hint: Read a number and store it to an
array if it is new. If the number is already in the array, ignore it. After the input, the array
contains the distinct numbers. Here is the sample run of the program:
3. Write a test program that prompts the user to enter two lists of integers and displays
whether the two are identical. Here are the sample runs. Note that the first number in the
input indicates the number of the elements in the list.
4. Write the program that display the following pattern
A.
543212345
5432345
54345
545
5
545
54345
5432345
543212345
B.
12345
1234
123
12
1
Group 4 Question
1. Write a C++ program that converts the octal number to hexadecimal and vice versa. The
numbers should be entered from the keyboard and the program must enable the user to
search, view and update the entered values.
2. Write a C++ program to accept any string and display ASCII code for each character as
well as convert each ASCII code to binary and vice versa. Enable the user to search any
character.
3. Write a program that prompts the user to enter the year and first day of the year and
displays the calendar table for the year on the console. For example, if the user entered
the year 2005, and 6for Saturday, January 1, 2005, your program should display the
calendar for each month in the year, as follows:
4. Write programs to display each of the following patterns.
A.
******
*
*
*
*
******
B.
*****
**
**
**
*****
Group 5 Question
1. Write a program that reads a positive integer number m and then prints the English
name of each digit of that number in a single line.
For example, for m = 147, the program should output: one four seven
2. Assume that you have a football competition in the computing club that has 11
players in Team1to compete with another opponent in Team 2. The coach of Team1
wants to change 3 players randomly so that other plays of the same team have to get
playing chances since they are well performed. Write a program that will handle the
above mention scenario and display the random numbers of the player to get out from
playing whenever the coach Guess Number is matched with the random number
generated in the range 1 to 11 players assigned number.(Assume the players' number is
given in order 1 to 11).
3. Write a program that calculates the value of a quadratic equation by accepting the
coefficient values from the keyboard.
4. Write a program in c++ to list non-prime numbers from 1 to an upper bound.
5. Write a code that creates a multiplication table that looks like the one below. Using a 2-
d array.