Write a program using standard string functions that accepts a price of an item and
display its coded value. The base of the key is:
X C O M P U T E R S
0 1 2 3 4 5 6 7 8 9
Sample Input/output Dialogue:
Enter Price: 489.50
Coded Value: PRS.UX
Write a C++ program to input the radius of a circle from user and find diameter,
circumference and area of the given circle using function.
Use the following formula:
Diameter = 2r
Circumference = 2 π r
Area = π r2
Note: π = 3.14
Write a C++ program to input a number from user and check whether given number is even or odd using functions.
Write a function arraylist which receives an array of integer values. The list of elements are
the following:
20, 40, 60, 80
50, 90, 70, 10
30, 100, 200, 300
An array containing 10 predefined double values are already provided for you in the code editor. Print each of the element out in separate lines, starting from the last array element down to the first.
Each outputted value must also only show up to two decimal places.
Output
Multiple lines containing a float number.
5.10
5.50
4.00
4.02
3.00
3.66
2.50
2.20
1.21
1.40
An array containing 5 integer elements is already provided for you in the code editor below.
Print out the cube of the 1st, 3rd, and 5th element of the given array.
Output
Multiple lines containing the cubes of the 3 elements of the given array.
-8
1
27
Different shapes have different dimensions and properties that can be used to compute their area and perimeter. Using namespace technique, create a C++ program that compute the area of circle, rectangle, triangle and sphere. Each shape must have its own namespace that houses two functions, the one for calculating the area and the other for perimeter or circumference.
Input a random positive integer. Then create an integer array that has a size equal to the inputted integer.
Using a loop, add random integer values into the array one by one. The number of values to be stored is dependent on the inputted positive integer given in the first instruction.
Print out the largest integer among all the elements on the array, by any means necessary.
Input
The first line contains the size of the array.
The next lines contains an integer.
5
5
34
3
23
10
An array containing 5 integer elements is already provided for you in the code editor below.
Print out the cube of the 1st, 3rd, and 5th element of the given array.
Output
Multiple lines containing the cubes of the 3 elements of the given array.
-8
1
27
Write c++ program to check whether agiven number is even or odd