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

Write a program that prompts the user for number of students to process. The program will allow the user to enter the name of student and then it will ask for the number of marks for that student. The program will then prompt for each score and will calculate the average mark for each student.


Sample Run:

Enter number of students: 2

Enter student 1 name: Jenny

Enter number of marks for Jenny: 2

Enter mark 1: 99

Enter mark 2: 88

Enter student 2 name: Kevin

Enter mark 1: 75

Enter mark 2: 76

Enter mark 3: 78

=============================

Student 1: Jenny

Marks: 99 88

Average for Jenny is: 93.5%

=============================

Student 2: Kevin

Marks: 75 76 78

Average for Kevin is: 76.3333%

=============================


Write a program in c++ to overload >> operator using friend function.





Write a programme in c++ to Overload << operator using friend function.


Write a program in C++, which demonstrates pre-increment operator overloading.



Take 20 integer inputs of an array from the user and print the following




Positive number. Negative number




Odd number. Even number




Number of 0


Create a C++ program using conditional statement. Read the worded problem below.

Supposed we have a client, he/she wanted you to create a program for his/her business.

He/She wanted to record the employee’s information. Now, on programmer’s side (You), we

have 3 buttons, the ADD, UPDATE, DELETE.

A. When we click DELETE button, there will be a notification telling the user of the program

if he/she wanted to delete the employee’s record. The pop-up information/display

when DELETE button is pressed: “Are you sure you want to delete this record?”

B. When the button ADD is pressed/triggered, it will display “Are you sure you wanted to

add this file?”

C. When the button UPDATE is pressed, it will display “Are you sure you want to update

this record?”


Draw a flowchart, write an algorithm and design a C++ program for an inventory system that will alert the user to reorder an item based on:

a. The stock-on-hand or an order is below the reorder print.

b. The item is not obsolete.

Use the selection structure.


Write a C++ instruction that declares and initializes a string variable name student name.

An ordinary colored printer can print 12 pages per minute. Make a program that will input number of pages, and compute the time to complete the print out. Consider the minutes and hour of your display. Your program will terminate if you input zero in the number of pages.


(minutes =no.pages/12)


Ex: Input pages: 720


Minutes = 60


Hour = 1


Write a function by using priority queue to merge two sorted arrays. The function will accept two integer


arrays and their sizes as arguments and then will merge them in ascending order and display the three


arrays.

LATEST TUTORIALS
APPROVED BY CLIENTS