Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write C++ programs to perform the following tasks. In the program descriptions below, example input and output is provided. NOTE: You dont need arrays to

Write C++ programs to perform the following tasks. In the program descriptions below, example input and output is provided. NOTE: You dont need arrays to solve any of these problems. You should NOT use arrays to solve any of these problems.

stat.cpp: Let the user input a one or more integers, space separated, on a single line (as seen below), then work out and display the sum, average, sum of squares and population variance of the numbers. Remember, you do not need nor should you use an array to solve this problem.

Enter integers: 2 4 1 3 Sum: 10.0 
 Average: 2.5 Sum of Squares: 30.0 Variance: 1.25 

numbers.cpp: Write a program that prints out the binary, octal, decimal, and hexadecimal representation (respectively) of all unsigned shorts (in order). If the number is divisible by 3, then also print Go. If the number is divisible by 5, then also print GOGOGO. Otherwise, S should also be printed. Below is a sample of some of the entries near the middle:

 0b1010'0000'0000'0000 0120000 40960 0xa000 GOGOGO 0b1010'0000'0000'0001 0120001 40961 0xa001 S 0b1010'0000'0000'0010 0120002 40962 0xa002 Go 0b1010'0000'0000'0011 0120003 40963 0xa003 S 0b1010'0000'0000'0100 0120004 40964 0xa004 S 0b1010'0000'0000'0101 0120005 40965 0xa005 GOGOGOGO 

output must look the same as the example provided above.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design Query Formulation And Administration Using Oracle And PostgreSQL

Authors: Michael Mannino

8th Edition

1948426951, 978-1948426954

More Books

Students also viewed these Databases questions

Question

What is focal length? Explain with a diagram and give an example.

Answered: 1 week ago

Question

What is physics and how does it apply in daily life?

Answered: 1 week ago

Question

Explain the function and purpose of the Job Level Table.

Answered: 1 week ago