Skip to content

Latest commit

 

History

History
24 lines (24 loc) · 1.68 KB

README.md

File metadata and controls

24 lines (24 loc) · 1.68 KB

visual-basic-tasks

There are 5 different tasks.

Task 1

Write a program that takes a seven-digit phone number as input and prints all possible words that make up those digits in the first column of Excel. Remember that each number on the phone represents 3 possible letters or the '+' sign. The number 1 does not represent any letter or sign.

1
2 ABC
3 DEF
4 GHI
5 JKL
6 MNO
7 PRS
8 TUV
9 WXY
0 +
Phone numbers containing 0 or 1 are rejected because they do not represent letters.

Task 2

Write a program that will balance the scales. The program takes two integers representing the weights of the left and right sides of the scale, as well as an array of values representing the various weights that can be used to balance the scale. The program should determine if there is a combination of at most two weights from a series of weights that can be placed only on one side, only on the other side, or on both sides of the scale so that the weights of the left and right sides are equal. For example: V(left) = 5, V(right)= 10, Weights = {1,2,3,5,12}. In this situation the program should print V(left)+2+3.

Task 3

Write a program that will automatically convert any Serbian text into Morse code.

Task 4

Write a program that throws out all possible combinations of putting +, -, or nothing between the numbers 1,2,...,9 (in this order) so that the calculated result is equal to 100. For example: 1+ 2 + 3 - 4 + 5 + 6 + 78 + 9 = 100.

Task 5

Write a program that converts a Roman numeral to an Arabic numeral. The input is the number N, composed of the symbols {I,V,X,L,C,D,M}. The output is an Arabic number in base 10.