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
Technology can most broadly be defined as anything that does which of the following ?
Anastasy [175]
I would say A. Allowing us to improve efficiency in the workplace has helped grow our economy and we can thank technology for that. Due the it always improving our lives only get that much easier.
5 0
4 years ago
The four levels of FBLA membership
Nataly_w [17]

Answer:

Future Business Leaders of America (FBLA) for high school students; FBLA-Middle Level for junior high, middle, and intermediate school students; Phi Beta Lambda (PBL) for post secondary students; and Professional Division for those not enrolled in school or post secondary school

Explanation:

7 0
3 years ago
Assume x represents an integer number, what is the highest index value in the following array? byte[] values = new byte[x]; Grou
scoundrel [369]

Answer:

You forgot to add a group of choices, however assuming this programming language uses 0-based indexes the answer would be x - 1

Explanation:

Zero based index languages have array indexes starting at 0. When you create that array, you use x to define the amount of elements, however due to the array starting at the index 0, the arrays highest index would be x - 1 instead of x.

4 0
2 years ago
Write a program to demonstrate doubly linked list using pointers – insert (beginning, end,
Mekhanik [1.2K]

A program to demonstrate doubly linked list using pointers – insert (beginning, end, middle), delete(beginning, end, middle),view) is:

/* Initialize nodes */

struct node *head;

struct node *one = NULL;

struct node *two = NULL;

struct node *three = NULL;

/* Allocate memory */

one = malloc(sizeof(struct node));

two = malloc(sizeof(struct node));

three = malloc(sizeof(struct node));

/* Assign data values */

one->data = 1;

two->data = 2;

three->data = 3;

/* Connect nodes */

one->next = two;

one->prev = NULL;

two->next = three;

two->prev = one;

three->next = NULL;

three->prev = two;

/* Save address of first node in head */

head = one;

<h3>What is a Doubly Linked List?</h3>

This refers to the linked data structure that contains of a set of sequentially linked records called nodes.

The requested program is given above.

Read more about doubly linked list here:

brainly.com/question/13326183

#SPJ1

3 0
1 year ago
Stanovte intenzitu magnetického poľa v strede tenkej cievky s 20 závitmi. Prúd je 2A , stredný polomer cievky je 4cm.
ExtremeBDS [4]

Answer:

Determine the intensity of the magnetic field in the center of a thin coil with 20 turns. The current is 2A, the mean radius of the coil is 4cm.

Explanation:

to help english help you

4 0
3 years ago
Other questions:
  • Write the definition of a method min that has two int parameters and returns the smaller.
    9·1 answer
  • What is the disadvantage of a mesh topology?
    12·2 answers
  • The closing of the letter should have at least
    12·1 answer
  • A file with a com extension is most likely to be a(n) ___ file.
    13·2 answers
  • Digital citizenship is both a right and a {Blank}.
    11·2 answers
  • The goal of this project is to become familiar with basic Python data processing and file usage. By the end of this project, stu
    8·1 answer
  • Please please help I don’t understand this
    6·1 answer
  • Describe psychographic differences among the past five generations of Americans that you learned about in this course. What type
    5·1 answer
  • The bullet points above describe _____.
    7·1 answer
  • Does the wireless signal between the cell phones require matter to travel from one phone to another?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!