Write a
Your program must contain at least the following functions: a function that calculates and returns the mean and a function that calculates the standard deviation.
Trending nowThis is a popular solution!
Chapter 6 Solutions
C++ Programming: From Problem Analysis to Program Design
- Write a program that mimics a calculator. The program should take as input two integers and the operation to be performed. It should then output the numbers, the operator, and the result. (For division, if the denominator is zero, output an appropriate message.) Some sample outputs follow:3 + 4 = 713 * 5 = 65arrow_forwardWrite a program using integers userNum and x as input, and output userNum divided by x four times. Ex: If the input is: 2000 2 the output is: 1000 500 250 125 Note: In Coral, integer division discards fractions. Ex: 6 / 4 is 1 (the 0.5 is discarded). 333666.1636490.qx3zqy7arrow_forwardWrite a program that mimics a calculator. The program should take as input two integers and the operation to be performed. It should then output the numbers, the operator, and the result. (For division, if the denominator is zero, output an appropriate message.) Some sample outputs follow:Enter two integers 2,32 * 3 = 6arrow_forward
- Write a program whose inputs are three integers, and whose output is the smallest of the three values. Ex: If the input is: 7 15 3 the output is: 3 I have most of the solution. I cannot figure out the answer if I input : 7 7 7.. My solution shows no output but the expected output is supposed to be a single 7arrow_forwardWrite a program that accepts the lengths of three sides of a triangle as inputs. The program output should indicate whether or not the triangle is an equilateral triangle. • Use The triangle is equilateral. and The triangle is not equilateral. as your final outputs. An example of the program inputs and output is shown below: Enter the first side: 2 Enter the second side: 2 Enter the third side:2 The triangle is equilateralarrow_forwardWrite programs that read a sequence of integer inputs and print a. The smallest and largest of the inputs. b. The number of even and odd inputs. c.Cumulative totals. For example, if the input is 1 7 2 9, the program should print 1 8 10 19. d. All adjacent duplicates. For example, if the input is 1 3 3 4 5 5 6 6 6 2, the program should print 3 5 6.arrow_forward
- Using python, write a program that takes the x-y coordinates of a point in the Cartesian plane and displays a message telling either an axis on which the point lies or the quadrant in which it is found. Sample Output: (-1.0, -2.5) is in quadrant III (0.0, 4.8) is on the y axisarrow_forwardWrite a program that reads in hours, minutes, and seconds as input, and outputs the time in seconds only. Ex: If the input is: 1 6 40 where 1 is the number of hours, 6 is the number of minutes, and 40 is the number of seconds, the output is: Seconds: 4000arrow_forwardWrite a program that inputs a sequence of non negative numbers terminated by a negative value and show the sum, average, maximum and minimum of the non negative numbersarrow_forward
- Write pseudocode for a program that outputs numbers in reverse order from 10 down to 0.arrow_forwardWrite a program whose input is a string which contains a character and a phrase, and whose output indicates the number of times the character appears in the phrase. Ex: If the input is: n Monday the output is: 1 Ex: If the input is: z Today is Monday the output is: 0 Ex: If the input is: n It's a sunny day the output is: 2 Case matters. Ex: If the input is: n Nobody the output is: 0 n is different than N.arrow_forwardWrite a program that inputs two positive integers of, at most, 20digits and outputs the sum of the numbers.arrow_forward
- C++ Programming: From Problem Analysis to Program...Computer ScienceISBN:9781337102087Author:D. S. MalikPublisher:Cengage Learning