1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
alexandr1967 [171]
3 years ago
7

Write a calculate_sq_inches_of_good_pizza function that accepts the diameter of a pizza and returns the area of the pizza minus

1 inch at the edge.
Computers and Technology
1 answer:
Feliz [49]3 years ago
6 0

Answer:

#include <iostream>

using namespace std;

<em>float</em><em> calculate_sq_inches_of_good_pizza(float diameter) { </em>

<em>    </em><em>float</em><em> radius= diameter/2;     </em>

<em>    </em><em>float</em><em> pi=3.14;</em>

<em>    </em><em>float</em><em> area;        </em>

<em>    area = pi</em><em>*</em><em>(radius</em><em>*</em><em>radius );</em>

<em>    </em><em>return</em><em> area;</em>

<em>} </em>

int main() {  

   float d;

   cout<<"enter the diameter of pizza"<<endl;

   cin>>d>>endl;

   float area_of_pizza = calculate_sq_inches_of_good_pizza();

   return 0;

}

Explanation:

Above program is written in C++ language which has function namely    float calculate_sq_inches_of_good_pizza(float diameter). This will calculate area of pizza from  given diameter and return it to main() function.

As we know pizza is circle and area of circle is equal to:

Area = π * radius*radius

π =pi=3.14

and we have calculated radius from given diameter

radius = diameter/2;

If you only want function not whole program than ignore main () function and only consider float calculate_sq_inches_of_good_pizza(float diameter) function which is in ITALIC notation.

You might be interested in
For your biology class, you have taken a number of measurements for A plant growth experiment. you wish to create a chart that s
Natasha2012 [34]
The answer is B, calc or excel
4 0
3 years ago
Real GDP removes any inflation from the calculation of GDP. Why is it important to remove a general increase in prices from the
Katen [24]
<span>C. Not including inflation into the caluculation will over-estimate the GDP.</span>
8 0
3 years ago
Why is body language an important factor in a business meeting
slava [35]

The importance of the body language in business. Body language is a language without spoken words, it is called non verbal communication. We use it all the time in our social life and business life so it is all about gestures movements and expressions made by people to deliver a specific message to other people. Business meetings are all about making a good impression.

5 0
3 years ago
PLS HELP ASAP) Omar is using the web to do research on diabetes. he needs to ensure that all of the information he finds regardi
LUCKY_DIMON [66]
Not sure on the first question, but the second would be answer choice a: Travel.state.gov since a website with .gov at the end tend to be trustworthy sources
4 0
3 years ago
Functional side effects: 15) Given the following Java/C++ like code. Assuming function calls (operands) are evaluated from left-
tigry1 [53]

Answer:

a. x = 5

b. x = 7

Explanation:

a)

OUTPUT: x = 5

In the main() function, fun1() is evaluated first and it updates the value of the global variable to 2 and returns 3.

The second function returns the value of the global variable 'a' and this variable has value 2.

So,

x = 3 + 2

x = 5

b)

OUTPUT: x = 7

In the main() function, fun2() is evaluated first and it returns 4 because global variable 'a' is initialized with value 4.

The second function fun()1 will returns the value 3.

So,

x = 4 + 3

x = 7

7 0
3 years ago
Other questions:
  • Rags or wipes are considered non-hazardous waste when they are
    15·2 answers
  • All the computers in this type of network are connected to two other computers.
    12·1 answer
  • Three IT Companies. Help me please!
    5·2 answers
  • Linux is: Select one: a. primarily concerned with the tasks of end users. b. designed for specific machines and specific micropr
    10·1 answer
  • A store owner keeps a record of daily transactions in a text file. Each line contains three items: The invoice number, the cash
    7·1 answer
  • Type the correct answer in the box. Spell all words correctly.
    5·1 answer
  • The ____ is a tool in versions of microsoft office starting with office 2007 that consists of tabs, which contain groups of rela
    7·1 answer
  • How to delete Brainly account ?​
    12·1 answer
  • What is the difference between second generation and third generation of computer​
    6·1 answer
  • Of the following field which would be the most appropriate for the primary key in a customer information table?
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!