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 C++ Program that input into 1-D array of 15 values. It fill the array then draw the bars one by one of the histogram.


A man walks 7 km in 2 hours and 2 km in 1 hour in the same direction.a) What is the man's average speed for the whole journey?Create a program that will automatically compute for the man’s average speed. Use function in designing the program. The formula on how to get the speed is speed = distance / time

Design a pseucode and flowchart for the question The population of a town A is less than the population of town B. However, the population of town A is growing faster than the population of town B. Write a program that prompts the user to enter the population and growth rate of each town. The program outputs after how many years the population of town A will be greater than or equal to the population of town B and the populations of both the towns at that time. (A sample input is: Population of town A = 5000, growth rate of town A = 4%, population of town B = 8000, and growth rate of town B = 2%.)


Part 1

Given 4 integers, output their product and their average, using integer arithmetic. 

Ex: If the input is: 

8 10 5 4

the output is:

1600 6

Note: Integer division discards the fraction. Hence the average of 8 10 5 4 is output as 6, not 6.75. 

Note: The test cases include four very large input values whose product results in overflow. You do not need to do anything special, but just observe that the output does not represent the correct product (in fact, four positive numbers yield a negative output; wow). 

Submit the above for grading. Your program will fail the last test cases (which is expected), until you complete part 2 below. 

Part 2

Also output the product and average, using floating-point arithmetic. 

Output each floating-point value with three digits after the decimal point, which can be achieved by executing

cout << fixed << setprecision(3); once before all other cout statements.


Add two queue elements


Requirements :


No global decelerations


Test run in main


Make use of #include<queue> header file

Write a c++ program that asks user to input starting and ending number of range. if the ending number is greater than starting number show the range input by user and display the following 1)sum of the even number between the range, 2)sum of all odd number between the range, 3)count how many numbers are present between the range, 4)how many numbers between the range are either divisible by 05 or 10, 5) if there is number "1000" present between the range, the ending number should change to 1000 and then should break, 6)average of all numbers between the range?

if the ending number is not greater than starting number show you entered an invalid range.


Consider a square matrix A of size nxn and an integer x which is an element of A. find the row number R and column number C of X in A, and calculate the sum R and C. If the sum is even, find the sum of the digits of all even numbers in the matrix, and if the sum is odd then find the sum of digits of all odd numbers in matrix


Consider a square matrix A of size nxn and an integer x which is an element of A. find the row number R and column number C of X in A, and calculate the sum R and C. If the sum is even, find the sum of the digits of all even numbers in the matrix, and if the sum is odd then find the sum of digits of all odd numbers in matrix



Write an algorithm to find the energy


produced at every second if the


reaction is allowed to happen for N


seconds



Write a program using integers userNum and x as input, and output userNum divided by x three times. 

Ex: If the input is:

2000 2

the output is: 

1000 500 250

Note: In C++, integer division discards fractions. Ex: 6 / 4 is 1 (the 0.5 is discarded).




LATEST TUTORIALS
APPROVED BY CLIENTS