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
Java Eclipse homework. I need help coding this
Maslowich

public class ArithmeticAssignment {

   public static void main(String[] args) {

       Tester test = new Tester();

       test.printTester();

   }

   

}

class Tester{

   Tester(){

       

   }

   void printTester(){

       int i1 = 79 + 3 * (4 + 82 -68) - 7 +19;

       int i2 = (179 +21 +10) / 7 + 181;

       int i3 = 10389 * 56 * 11 + 2246;

       System.out.println(i1);

       System.out.println(i2);

       System.out.println(i3);

   }

}

I think this is what you wanted. I hope this helps!

5 0
3 years ago
A key part of running a business blog is ensuring it, and by extension the organization’s website are easily discoverable. Make
blondinia [14]

Answer:

SEO Friendly

Explanation:

Making websites SEO Friendly refers to design styles that makes search engines to easily find contents on the website. The search engines can easily find content on individual page of the website efficiently and interpret effectively.

3 0
4 years ago
How can you add contrast between text and headlines in a document? increase the font size of the headline make the headline long
Pavlova-9 [17]
Increase the font size and make the headline bold
8 0
3 years ago
Importance of computer education​
Stells [14]

Answer:

hope this helped

Explanation:

Computer technology has helped the world to grow and evolve quickly. By performing tasks quickly, computers make daily activities more convenient. They give people access to a wide array of information and can reach even the most remote locations on the planet.

6 0
3 years ago
What does the MLA style not require that both the APA and Turabian do
snow_lady [41]

Dunno if this helps but here goes nothin

An APA-formatted paper includes the author's last name and year of publication in parenthesis after the cited text. An MLA-formatted paper includes the author's last name and page number in parenthesis after the text.

3 0
4 years ago
Other questions:
  • You grant them remote access to your computer to enable them to act as you to fix the situation. what type of os must be install
    9·1 answer
  • What are the three major functions of a game engine?
    15·1 answer
  • which option of the AutoCorrect tool enables you to add and delete words that do not follow abbreviation rules?
    10·2 answers
  • For what reason can security risks never be fully eliminated?​
    7·1 answer
  • Hi I need help with an assignment. We're learning about encryption and decryption in code.org. i need help with three of the tex
    14·1 answer
  • Please Complete in Java a. Create a class named Book that has 5 fields variables: a stock number, author, title, price, and numb
    10·1 answer
  • Write the following abbreviations in full next to the question number
    15·1 answer
  • If you cannot find a template on your computer that was appropriate for your task, what should you do?
    12·1 answer
  • Given the IPv4 address in CIDR notation 215.200.110.50/25, identify the subnet ID that this address belongs to.
    9·1 answer
  • ____ includes) all tools that capture, store, process, exchange, and use information.
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!