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
Both Wireshark and NetWitness Investigator can be used for packet captures and analysis. Which tool is preferred for each task,
NikAS [45]

Answer:

  • <u>packet capture best suited for Wireshark </u>
  • <u>packet analysis best suited for Netwiness</u>

Explanation:

Although both software packages can carry out each task, however, expert network administrators have noted that in terms of effectiveness, the Wireshark software application is best suited for packet capture since unlike Netwitness has no limitation on the size of files it can capture.

Whereas, because Netwitness has a capacity of up to seven-layer protocol analysis, it can perform a more detailed analysis of packets.

5 0
3 years ago
A user is trying to log into windows on her notebook computer. she enters the correct password for her user account, but the sys
ASHA 777 [7]
Try restarting the PC. I have the same issue on Windows 10 sometimes generally its a network error because Windows 10 has a lot of internet required features... 
7 0
4 years ago
Sharing private information causing a person to be humiliated is considered to be doxing. T or F
sergij07 [2.7K]

Answer:

T

Explanation:

Doxing:

search for and publish private or identifying information about (a particular individual) on the internet, typically with malicious intent.

i would say it matches the definition

8 0
2 years ago
Which is the most efficient way to make a row of text bold in every worksheet in a file?
astra-53 [7]
You have to highlight the text and then click the bold B

6 0
3 years ago
Read 2 more answers
Oracion con punto focal​
gizmo_the_mogwai [7]

Answer: Prayer with focal point

Explanation:

7 0
3 years ago
Other questions:
  • You try to enter your name into a cell that accepts a numeric value. What error would you receive
    12·2 answers
  • When should you check to see that fuel lines, connections, and fuel vents are in good condition?
    7·1 answer
  • What name are input devices, output devices, and auxiliary storage devices collectively known?
    9·1 answer
  • Which of these decisions would u most likely make on ur own
    8·2 answers
  • What the benefit is of folders when working with files
    13·2 answers
  • A bug was discovered in Canvas where the website crashes if 2 or more students are writing a discussion post at the same time. I
    10·1 answer
  • What is the output of executing the code segment?
    7·1 answer
  • The use of computer in a modern world is as a result of complexity. true or false
    6·1 answer
  • They have outlined their technical needs and have sent some of the documentation along with the potential provider's SLAs and te
    14·1 answer
  • As part of its commitment to sustainability, a company is looking for a way to track the source of purchased goods and how they
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!