Write a C++ Function program that takes up to 10-digit integer input from user (can be 1 digit, 2 digit, and
so on..); passes this to a function which reverses the digits. Finally, the reversed number should
be displayed in the main function. For example: when user enters 10-digit like 1234567890 your
function will reverse it to 987654321. Do not use strings. Be careful for big integer values. [use
functions, decision control]
A certain traveling wave has frequency of 200hz. A wave length of 2m and an amplitude of 0.04m. calculate the displacement (Y) at a point (x) 0,3 from the origin at a time 0.01sec after zero displacement at that point (note, the wave is traveling in opposite direction).
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 C++ program .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.
Enter a number: 19
Number Computation Result cycle/iterations
19 1 2 + 9 2 82 1
82 8 2 + 2 2 68 2
68 6 2 + 8 2 100 3
100 1 2 + 0 2 +0 2 1 4
I tried 19 for happy number
I tried 4 iterations.
19 is a happy number
write a C++ program.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.
Enter a number: 19
Number Computation Result cycle/iterations
19 1 2 + 9 2 82 1
82 8 2 + 2 2 68 2
68 6 2 + 8 2 100 3
100 1 2 + 0 2 +0 2 1 4
Calculate the mass of Na2O that forms if 4,8g O2 reacts completely with sodium
How do you merge cell A1 to D1
write a C++ program for a Semi-autonomous vehicle (Self-Driving Car) that has the
following requirements. Class name is Car that contains the following attributes.
• The name of car
• The direction of car (E,W,N,S)
• The position of car (from imaginary zero point)
• Create a rough Map of the way you come to school (e.g go east for x distance, go west
for x distance, etc) and use the class that you just created a function and pass in these
values and print the steps. For example, I turn west for 200m so it would print: “Moving:
West for distance: 200” (Translate the map into code)
why the ionic radii for S2- is larger than O2-
Define a function named GetWordFrequency that takes a vector of strings and a search word as parameters. Function GetWordFrequency() then returns the number of occurrences of the search word in the vector parameter (case insensitive).
Then, write a main program that reads a list of words into a vector, calls function GetWordFrequency() repeatedly, and outputs the words in the vector with their frequencies. The input begins with an integer indicating the number of words that follow.
Ex: If the input is:
5 hey Hi Mark hi markthe output is:
hey 1
Hi 2
Mark 2
hi 2
mark 2