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

Create a program that will prompt the user to enter a number in the range 1-100 to find my favourite number. If the number is less than favourite number, print “Too low...guess again: ”. If the number is greater than favourite number, print “Too high...guess again: ”. Ask again and exit until the number entered is the correct favourite number. in C++ program (while loop)


write a program that prompts the user to enter the age of a customer.if the age is younger than 15 then ask the user to enter the name of the customer and notify them by name that they qualify a free toy


monica has cooked n dishes and collected the data on the level of satisfaction for all the dishes from a guest. the guest returns an array, where the ith element of the array is the liking level of the ith dish. also, the time taken to cook the ith dish is i. like-to-time coefficient of a dish is calculated by multiplying the time taken to cook food with its liking level, i.e., input 2[i]. totally like-to-time coefficient is calculated by summing up all individual coefficients of dishes. you want the total like-to-time coefficient to be maximum. you can also remove some dishes, in which case, a new coefficient is calculated using the left dishes. find the maximum sum of all possible like-to-time coefficients.​program done by using functions.


Suppose NAME is a 8 element array and 5 elements (Brown,Davis,Johnson,Smith,wagner)are in array observe that names are listed alphabetically and keep it alphabetical all times suppose ford and Taylor are added to the array and Davis removed from array

Consider the following declaration. For each of the following statements (a) to (f) write a


single statement to perform the indicated task.


float number1 = 7.3, number2;


(a) Declare the variable fPtr to be a pointer to an object of type float.


(b) Assign the address of variable number1 to pointer variable fPtr.


(c) Print the value of the object pointed to by fPtr together with a suitable message.


(d) Assign the value of the object pointed to by fPtr to the variable number2.


(e) Print the address of number1 together with a suitable message.


(f) Print the value stored in fPtr together with e suitable message


Create a program that will overload a function four (4) times. The function takes a single parameter but each parameter is different in each function.


Suppose you are given two dictionaries. Now create a new dictionary "marks", merging the two dictionaries, so that the original two dictionaries remain unchanged. Note: You can use dictionary functions. =================================================================== Given: {'Harry':15, 'Draco':8, 'Nevil':19} {'Ginie':18, 'Luna': 14} Output: {'Harry': 15, 'Draco': 8, 'Nevil': 19, 'Ginie': 18, 'Luna': 14} =================================================================== Given: {'A':90, 'B': 0} {'C':50} Output: {'A': 90, 'B': 0, 'C': 50}


Using a class to represent the planet and its gravity, develop a program that outputs the user's weight on different planets.


  • The class's constructor should allow a planet to specified as a capitalized string. If the string is not a planet's name or is not capitalized, then the planet of EARTH should be assumed as the default value.
  • The default constructor for the class will create an object representing Earth. The class has a function called "convertWeight" that takes in a weight on earth as an argument and returns the name of the planet as well as the converted value reflecting weight on the given planet to console.
  • The program should output an error message and reprompt for input if the user does not input a correct planet name that is also capitalized.




Create a program that asks the user to enter the names of their last three employers. Output the names entered to confirm. Ask the user if the confirmation output is correct. If Yes, end the program. If No, then ask for the three names again.

 

Output:

This program will ask you to enter the company name of your last three employers.

Enter the company name:   [user types: 123 Corp]

Enter the company name:   [user types: 789 Corp]

Enter the company name:   [user types: Kendall Corp]

These are the company names you entered:

123 Corp

789 Corp

Kendall Corp

Are these three names correct (Y or N)?  [user types: n]

Enter the company name:   [user types: ABC Corp]

Enter the company name:   [user types: XYZ Corp]

Enter the company name:   [user types: Miami Corp]

These are the company names you entered:

ABC Corp

XYZ Corp

Miami Corp

Are these three names correct (Y or N)?  [user types: y]



This is similar to the exercise we did in class but with two changes: (1) Use doubles instead of ints; (2) The user will be providing the numbers. Just like the class exercise, output the sum, average, highest, and lowest of the user's numbers. 

 

Output:

This program will ask you to enter 5 numbers with decimal places.

It will then show you the total, average, largest number, and smallest number.

Enter a number:   [user types: 5.2]


Enter a number:   [user types: 9.8]


Enter a number:   [user types: 2.5]


Enter a number:   [user types: 17.5]


Enter a number:   [user types: 7.5]


Total: 42.5

Average: 8.5

Lowest: 2.5

Highest: 17.5


LATEST TUTORIALS
APPROVED BY CLIENTS