C++ Answers

Questions answered by Experts: 9 913

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search

unconditonally transfer program control within a function


Write a program that reads in a room number, the room’s capacity, and the size of the class enrolled so far, and prints an output line showing the class room number, the capacity, number of students enrolled, number of seats available, and whether the class is closed or not.


Using while or do-while. Make a program that will input Sales, process the Value Added Tax deduction as follows:

 Sales

VAT

Less than equal =10000.00

10%

Above 10000.00

15 %


Display the taxable amount, Your program will be terminated if you input zero in the sales.


The XYZ Manufacturing Company plans to give year-end bonus 

to its employees. Make a flowchart and write a program that 

will compute for the year-end bonus of its employees 

considering the following criteria:

- If employee’s monthly salary is less than or equal to 

P7000, bonus is 50% of the salary.

- For employees with salaries greater than P7000, bonus is 

P7000.

- Print out the names, salaries and the corresponding 

bonuses of the employees.


Create a small Arduino project in tinkerCAD. 

The project must make use of at least the following:

● Any 1 of the following analog sensors: TMP36, Flex sensor, Photoresistor, or Force Sensor.

AND

● Any 2 of the following Digital input devices: Pushbutton, Slide switch, or DIP switch.

AND

● Any 1 of the following Digital output devices: LED, or Piezo Buzzer.

AND

● Any 1 of the following PWM output devices: DC Motor, Hobby gearmotor, RGB LED.

AND

● A 16x2 LCD display


In you program you must make use of the following:

● analogRead(), digitalRead(),analogWrite(), digitalWrite()

● if statements and if else statements, (i.e. testing the value of a sensor)

● at least 1 while loop

● at least 1 for loop 

● an array

● variables

● The LCD display

● arithmetic ( + , - , * , / , % ) and compound operators (+=,-=,*=,/=,%=)

● Comparison and Logical operators



What will the value of the solution variable be after the code segment below has been run.


int solution = 8; 

int number1 = 16, number10 = 3; 

 

solution *= number1 - number10 ;


What will the value of the solution variable be after the code segment below has been run.


int solution = 80; 

int number56 = 16, number15 = 7; 

 

solution -= number56 * number15 ;  



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.


LATEST TUTORIALS
APPROVED BY CLIENTS