Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need to complete EACH ONE OF THESE 5 EXERCISES with a given code. Every instruction is included in the pictures. The code I need

I need to complete EACH ONE OF THESE 5 EXERCISES with a given code. Every instruction is included in the pictures.image text in transcribed

image text in transcribed The code I need to modify with the exercises: image text in transcribed image text in transcribed

#include

#include

using namespace std;

// This program will demonstrate the scope rules.

// PLACE YOUR NAME HERE

const double PI = 3.14;

const double RATE = 0.25;

void findArea(float, float&);

void findCircumference(float, float&);

int main()

{

cout

float radius = 12;

cout

cout

{

float area;

cout

cout

// Fill in the code to call findArea here

cout

cout

}

{

float radius = 10;

float circumference;

cout

cout

// Fill in the code to call findCircumference here

cout

cout

}

cout

cout

return 0;

}

// *********************************************************************

// findArea

//

// task: This function finds the area of a circle given its radius

// data in: radius of a circle

// data out: answer (which alters the corresponding actual parameter)

//

// ********************************************************************

void findArea(float rad, float& answer)

{

cout

cout

// FILL in the code, given that parameter rad contains the radius, that

// will find the areato be stored in answer

}

// ******************************************************************************

// findCircumference

//

// task: This function finds the circumference of a circle given its radius

// data in: radius of a circle

// data out: distance (which alters the corresponding actual parameter)

//

// *****************************************************************************

void findCircumference(float length, float& distance)

{

cout

cout

// FILL in the code, given that parameter length contains the radius,

// that will find the circumference to be stored in distance

}

Exercise 1: Fill in the following chart by listing the identifiers (function names, variables, constants) GLOBALMain Main Main Area Circum- (inner 1)(inner 2) Exercise 2: For each cout instruction that reads: cout

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

Practical Issues In Database Management A Refernce For The Thinking Practitioner

Authors: Fabian Pascal

1st Edition

0201485559, 978-0201485554

More Books

Students also viewed these Databases questions

Question

=+ d. a professor deciding how much to prepare for class

Answered: 1 week ago