Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ Program 1. Write a program that determines the SUM of N positive numbers, starting from 1 to the number N. The program shall ask

C++ Program
image text in transcribed
1. Write a program that determines the SUM of N positive numbers, starting from 1 to the number N. The program shall ask the user what will be the number nth that you want fin the sum to; and find sum of all numbers to that value. You need use For Loop. (for example if the user said 5 then the program will calculate 1+2+3+4+5 ) and give the results as Sum of Positive numbers from 1 to 5 is: 15). 2. Write a program that use FUNCTION called calculate Volume(length, width, height) which receives three parameters, length, width, and height of a rectangular cube and return the volume. The volume of a rectangular cube is calculated by multiplying length times width times height. And print the results. The user will give the length and the width and the height thru key board input and the results shall be written as (as example) For a cube of length = 5 and width = 3 and height = 4 the volume is : 60 inch-cube The program shall ask the user if he/she wants to continue if answer is Y (for yes) will loop if the answer is N (for No) will end. In a- while statement)

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

Step: 3

blur-text-image

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

Fundamentals Of Database Systems

Authors: Sham Navathe,Ramez Elmasri

5th Edition

B01FGJTE0Q, 978-0805317558

More Books

Students also viewed these Databases questions

Question

How does a process description differ from instructions

Answered: 1 week ago

Question

What are the Five Phases of SDLC? Explain each briefly.

Answered: 1 week ago

Question

How can Change Control Procedures manage Project Creep?

Answered: 1 week ago