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
What is the most efficient way to include a space after each paragraph
3241004551 [841]

To skip a line, then write the rest like this!


See? Good spacing, right?

4 0
2 years ago
What is a spreadsheet program?<br> A spreadsheet program is a computerized version of_________.
BabaBlast [244]
I dont know what exact answer youre looking for because you didnt provide options but..
"A spreadsheet<span> is </span>a sheet<span> of paper that shows accounting or other data in rows and columns; </span>a spreadsheet<span> is also a </span>computer<span> application </span>program<span> that simulates a physical </span>spreadsheet<span> by capturing, displaying, and manipulating data arranged in rows and columns."</span>
3 0
3 years ago
Read 2 more answers
What are the answers for edhesive quiz 2? I can’t add more than 1 photo...
KatRina [158]

Answer:

i have no idea srry

Explanation:

hi

7 0
2 years ago
The angles of a quadrilateral are in the ratio 1:2:3:4 what is the largest angle​
zheka24 [161]

Answer:

144°

Explanation:

The sum of the measures of interior angles of a quadrilateral is 360°

The ratio of angle measures is 1:2:3:4

Total ratio = 1+2+3+4=10

The angles will be :

1/10 * 360°= 36°

2/10*360°=72°

3/10*360°=108°

4/10*360°=144°

The largest angle is 144°

7 0
3 years ago
Some of y'all make me lose braincells with your questions
boyakko [2]

Answer:

ok done we will try

BTW have a nice day enjoy your day Stay blessed stay happy stay strong

5 0
2 years ago
Read 2 more answers
Other questions:
  • Write a complete C++ program that do following. Read a positive integer from the user with proper prompt. Assume that this user
    9·1 answer
  • Given a variable temps that refers to a list, all of whose elements refer to values of type float, representing temperature data
    10·2 answers
  • Gear systems with __________ can have both drive and driven gears on the same shaft. a. an odd number of gears b. an even number
    6·1 answer
  • I have this assignment due TONIGHT BEFORE 10PM! Please help. 50 points for whoever will help!! Here is the assignment.
    7·1 answer
  • Network topology is a direct representation of
    9·1 answer
  • Is there any quantum computer in India?​
    9·1 answer
  • Travis just got promoted to network administrator after the previous administrator left rather abruptly. There are three new hir
    14·1 answer
  • State 4 basic operation performed by a computer​
    11·2 answers
  • What is the purpose of a format painter in Word?
    15·2 answers
  • Which statement is true about biometrics as an authentication method?​
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!