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
Which of the following modes of replication requires a very low latency network connection and ensures data remains in synch wit
Snowcat [4.5K]

Answer:

b. Synchronous replication

Explanation:

Replication of data in storage partitions or in a number redundant array of independent disk drives helps to promote redundancy, as implied, and faulty tolerance to reduce loss of data.

There are two categories of replication and they are synchronous and asynchronous replication.

Synchronous replication requires low latency network site to mirror data, while asynchronous replication mirrors data in large metropolitan area in high latency networks.

4 0
3 years ago
Which microsoft operating system started the process of authenticating users with a user name and password?
11111nata11111 [884]
It should be either windows 98 or windows xp but I think it is windows xp
5 0
3 years ago
Data in the form of digits is called
Flauer [41]
Numeric data because it consist of numbers
5 0
2 years ago
Critical thinking questions
Scrat [10]

Answer:

1: A loop will continue running until the defined condition returns false . ... You can type js for , js while or js do while to get more info on any of these. ... initialization - Run before the first execution on the loop. ... But it can be used to decrement a counter too.

2: The loop increments the value of new while the loop condition is true. The end value of new is 3.

3: We could use some sort of finger recognition or face so they don’t have to type in their password.

4: give them a second chance for their date of birth.

5: sum = 0 must be before for loop. If inside for loop, it will keep resetting sum to 0 each iteration.

Explanation:

8 0
1 year ago
Passwords are usually alphanumeric and usually cannot contain spaces or ________.
vlada-n [284]

Answer:

The answer is A. Punctuation.  A password can contain symbols

Explanation:

3 0
2 years ago
Read 2 more answers
Other questions:
  • 1. Jesse wants a recommendation about creating an SCR help desk. She said that I can find lots of information about help desks o
    7·1 answer
  • What is software that helps a computer operate efficiently and keeps track of data on a computer?
    14·1 answer
  • Write a program that asks the user to enter the amount s/he has budgeted for a month. The amount should be between 1000 and 2000
    11·1 answer
  • What is performance? Multiple Choice measures how quickly a system performs a process or transaction a system that is not operat
    9·2 answers
  • So, I have strict parents &amp; need help, if u don’t know how to fix this after u read it, leave. I don’t want u getting points
    11·2 answers
  • A bag of cookies holds 40 cookies. The calorie information on the bag claims that there are 10 servings in the bag and that a se
    10·1 answer
  • Given the strings s1 and s2 that are of the same length, create a new string consisting of the first character of s1 followed by
    12·1 answer
  • Explain in a few sentences the difference between analytical papers and argumentative papers.
    8·2 answers
  • What type of culture is computer hardware?
    6·2 answers
  • Which of the following does Secure Sockets Layer (SSL) use to authenticate a user or system before encrypting a session?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!