.Write a simple encryption program using string functions which apply the substitution method. Here is the given Substitution Table. Substitution Table: A * E $ I / O + U -
Write a program using one-dimensional array that searches a number if it is found on the list of the given 5 input numbers and locate its exact location in the list.
Sample input/output dialogue:
Enter a list of numbers: 5 4 8 2 6 Enter a number to be searched: 2 2found in location 4
Write a program using two-dimensional arrays that computes the sum of data in rows and sum of data in columns of the 3x3 (three by three) array variable n[3[3]. Sample input/output dialogue: 5 9 8 = 22 3 8 2 = 13 4 3 9 = 16 --------------------- 12 20 19
Create a program to compute the volume of a sphere. Use the formula: V= (4/3)*πr 3 where π is equal to 3.1416 approximately. The variable r is the radius. Display the volume of a sphere.
Roman Numerals
Write a program to convert a non-negative integer
N to its Roman numeral representation.Roman numerals are usually written largest to smallest from left to right.
symbol value
I 1
V 5
X 10
L 50
C 100
D 500
M 1000
A number containing several decimal digits is built by appending Roman numeral equivalent for each, from highest to lowest, as in the following examples:
The input will be a single line containing a positive integer N.
The input number not be greater than 104.
Output
The output should be a single line containing representation of Roman Numeral of number N.
See Roman Numerals Table for Symbol and corresponding value.
Sample Input 1
2
Sample Output 1
II
Sample Input 2
1994
Sample Output 2
MCMXCIV
Closest Palindrome Number
Given a string N, representing an integer, return the closest integer (not including itself), which is a palindrome. If there is a tie, return the smaller one.
The closest is defined as the absolute difference minimized between two integers.
The input will be a single line containing an integer.
The output should be a single line containing the closest palindrome number to the given integer.
For example, if the given integer is 19, the palindrome number greater than 19 is 22 and the palindrome number less than 19 is 11. As 22 is closest to the number 19. So the output should be 22.
For example, if the given integer is 15, the palindrome number greater than 15 is 22 and the palindrome number less than 15 is 11. As 11 is closest to the number 19. So the output should be 11.
Sample Input 1
19
Sample Output 1
22
Sample Input 2
15
Sample Output 2
11
Explain the following:
a) Memory Leak
b) Dangling Pointer
Write c++ program code that can multiply any two matrices. The matrices read from a file. The result kept in a separate file
Write a program that prompts the user to input the coordinates of a line which lie on the circumference of a circle .write a program to compute area of circle (hint: use distance formula for calculating the diameter of a circle.)
Write a complete c++ program code which can multiply any two matrices.
The two matrices must be any size.
The elements of the two matrices is read from a file ex:matrix.dat
The result will be kept in a separate file call ex:matrix.res
Your program must be able to check whether the multiplication of the matrix can be done.