Questions: 9 913

Answers by our 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 & Filtering

Write a program that reads a list of integers, and outputs whether the list contains all multiples of 10, no multiples of 10, or mixed values. Define a function named IsVectorMult10 that takes a vector as a parameter, representing the list, and returns a boolean that represents whether the list contains all multiples of ten. Define a function named IsVectorNoMult10 that takes a vector as a parameter, representing the list, and returns a boolean that represents whether the list contains no multiples of ten.

Then, write a main program that takes an integer, representing the size of the list, followed by the list values. The first integer is not in the list. 

The program must define and call the following two functions. IsVectorMult10 returns true if all integers in the vector are multiples of 10 and false otherwise. IsVectorNoMult10 returns true if no integers in the vector are multiples of 10 and false otherwise.

bool IsVectorMult10(vector<int> myVec)

bool IsVectorNoMult10(vector<int> myVec)



Write a C++ program which takes multiple Employees information (records) as inputs from the


user and save them on a file using class. Writing in file should be done using setters. Perform


following operations on the data saved in the file:


• Read data from file


• Search an employee’s information in the file


• Count the number of employees having salary more than 50,000.

Write a C++ program which takes 5 students’ information (records) as inputs from the user and


save them on a file. Your program should have two options: writing and searching.



When a user selects writing option, you are required to take three inputs from the user: student


name (string type), student age (int type). After reading these data-items write to the file named “student.txt”. Please note: write data using append mode otherwise previous information will be lost.



Your program should have a search function. The search function should provide three options


for searching: by name, by age, or by registration number. After selection of the search option


by the user, please take input (name, age, or registration number) and search that student from the


file and display its record on the screen.


Write a program that reads a group of numbers from the user and places them in an array of type int. Once the numbers are stored in the array, the program should average them and print the result.


Happy Numbers: A number is called a happy number, if you start with the given number

and arrive at 1 by repeating the following process (as illustrated in the below example):

(a) compute the sum of the squares of given number digits

(b) if the resultant value is 1, then the number is happy number, else execute point (a) for

the newly produced number.

Note that if a number is not a happy number, there will be an endless loop to this execution.

Goal: In this question, you are required to write a recursive function that checks whether

the number entered by the user is a happy number or not for 10 cycles/iterations only. The

output shown in blue colour should be shown by the function and text in yellow colour

should be displayed by the main function.


Write a C++ program in which write a function convert() that converts a decimal number to a binary, octal, and

hexadecimal equivalents. The function will take two arguments: first argument will be

the number to be converted and second argument will be the base in which this number

is to be converted. Function should return the converted value. You may use strings to

represent converted numbers like “0x3A”, “00101100”, “72” etc.

b. Call convert() function in the main program to produce the following output. It is same

as you made in the previous assignment.

Example output:

Enter upper limit = 20

Enter lower limit = 30

Please enter a value of lower limit between 0 and the upper limit and try again.

Enter lower limit again = 10

............................................................................

Decimal Binary Octal Hexadecimal



Wite a C++ function. A college offers a course that prepares students for the state licensing exam for real estate brokers.

Last year, ten of the students who completed this course took the exam. The college wants to know

how well its students did on the exam. You have been asked to write a program to summarize the

results. You have been given a list of these 10 students. Next to each name is written a 1 if the

student passed the exam or a 2 if the student failed.

Your program should analyze the results of the exam as follows:

Input each test result (i.e., a 1 or a 2). Display the prompting message "Enter result" each time the

program requests another test result.

Count the number of test results of each type.

Display a summary of the test results indicating the number of students who passed and the

number who failed.

If more than eight students passed the exam, print the message "Raise tuition."


Write a program to overload operators in the same program by writing suitable operator member functions for following set of expressions: O5= (O1/O2) *(O3+O4) [Here O1,O2,O3,O4 and O5 are objects of a class “overloading”, and this class is having one integer data member] 


Create a c++ class entertainment consisting of the following data members:

• Title

• Air_Date i.e. Release Date

• Genre

• Type (i.e. Movie, TV Show)

• Runtime

• Country

• Actors

• Rating.


Follow the instructions below for creating the class and objects: Store the owners name as a dynamic array data member.

• Store the genre as a dynamic array data member.

• Store the names of the actors as a dynamic array data member.

• Create an object named “obj1” and initialize the object.

• Create a copy constructor that can list of genre, country and rating.

• Generate another object named “obj2” that is created by copying only the genre, country and ratings from “obj1”.

• Initialize the remaining attributes with values of your own. 

Write a program that randomly fills in 0s and 1s into a

6 X 6 matrix, prints the matrix and finds the first row and the first column with the

least 1s.


LATEST TUTORIALS
APPROVED BY CLIENTS