Write a loop that sets newScores to oldScores shifted once left, with element 0 copied to the end. Ex: If oldScores = {10, 20, 30, 40}, then newScores = {20, 30, 40, 10}.
Write a program which takes 10 strings from the user and saves it in the vector container. Then, using map - an associative container - process the vector, so that in the end, the map contains strings as keys and number of occurrences as a value.
Write a program that generate 20 random integers between 10 and 90 and then stores
it in an array. Your goal is to find:
• Mean
• Median
• Mode
For this question, provide switch menu to user in order to select one of the option from
above.
Write a program that generate 20 random integers between 10 and 90 and then stores
it in an array. Your goal is to find:
• Mean
• Median
• Mode
For this question, provide switch menu to user in order to select one of the option from
above.
Write a program that allow you to write the salaries of 10 employees. The program will tell you tha maximum and the minimun salary
Martin your friend has declared a class called Employee with the following members; Employee
ID, Employee Name, Basic Salary, Allowance, and Net Salary.
a) Write a code for a member function called get_input that will be used for data input.
(3 Marks)
b) Write a code for a member function called Calculate that will be used to calculate net
salary as the sum of basic salary and allowances.
(2 Marks)
c) Write a code for the default constructor that will assign values to the variables in the
Employee class.
(3 Marks)
d) Write a code for the default constructor.
(3 Marks)
e) Write a complete program that captures and includes all the details in (a-d) above.
Run the code and show your output.
The following are the assumed existing equivalent currency rates corresponding to the US
dollar ($1.00); Australia (Aus $), 1.09; Hong Kong (HK $), 7.81; Indonesia (Rupiah), 990.41;
Japan (Yen), 234.93; Malaysia (Ringgit), 2.34; Philippines (Peso), 13.80. Prepare a program that
will accept US dollar and currency to be converted as inputs, then compute the equivalent in
the chosen foreign currency. Print the results.
(Use if then else statement.)
Make a program that will input two number, If the two number entered are ODD then perform the addition and display the Sum. Your program will be terminated by an option if the user not to proceed another entry.
Ex, No. 1: 5 No. 2: 3
No. 1: 3
No. 2: 2
Sum is : 8
One of the number entered is not ODD
Create IPv4 subnetworks for the following given requirements:
a) 182.150.1.0/24 – Create VLSM scheme for two subnets, Subnet A requires 56 hosts and Subnet B needs 8 hosts.
· Subnet A:
· Subnet B:
a) 166.139.31.0/24 – Create VLSM scheme for two subnets, Subnet C requires 12 hosts and Subnet D needs 5 hosts.
· Subnet C:
· Subnet D: