Given the number of people attending a pizza party, output the number of needed pizzas(not number of slices) and total cost. For the calculation, assume that people eat 2 slices on average and each pizza has 12 slices and costs $14.95.

Output each floating-point value with two digits after the decimal point, using the precision format string in the printf() function call.

Example: printf("$%.3lf\n", 12.94444); would print "$12.944" and a new line.

The challenge to getting all credit will be to ensure that the number of pizzas is rounded upwards so that there is enough pizza for the average consumption of 2 slices per person rather than the total number of slices needed. For example, 6 people need 1 pizza….what about 7 people?

Ex: If the input is:

4
the output is:

Pizzas: 1
Cost: $14.95
Hint: Use the ceil() function to round up the number of pizzas so that enough pizzas are ordered.

Answers

Answer 1

We have that the print command of the code  is mathematically given as

   printf("Pizzas: %d\n",numPizzas);

   printf("Cost: $%.2f\n", cost);

   return 0;

Programming

We take into  consideration the the parameters

Assume that people eat 2 slices on average and each pizza has 12 slices and costs $14.95.

Generally the Program that defines the result

   int main() {

   int Humans;

   int numPizzas;

   double cost;

   scanf("%d",&Human);

   numPizzas = ceil((2*people) / 12.0);

   cost = numPizzas * 14.95;

   printf("Pizzas: %d\n",numPizzas);

   printf("Cost: $%.2f\n", cost);

   return 0;

For more information on Programming visit

https://brainly.com/question/13940523


Related Questions

The memory capacity in bits for performing the operation y = f (x) using the table lookup method, where x is an 8-bit number and y is a 16-bit number, is equal to:

a) 4096
b) 2048
c) 128
d) 8
e) 16

Answers

Answer:

The page field is 8-bit wide, then the page size is 256 bytes.

Using the subdivision above, the first level page table points to 1024 2nd  level page tables, each pointing to 256 3rd page tables, each containing 64 pages. The program's address space consists of 1024 pages, thus we need we need 16 third-level page tables. Therefore we need 16 entries in a 2nd level page table, and one entry in the first level page table. Therefore the size is: 1024 entries for the first table, 256 entries for the 2nd level page table, and 16 3rd level page table containing 64 entries each. Assuming 2 bytes per entry, the space required is 1024 * 2 + 256 * 2 (one second-level paget table) + 16 * 64 * 2 (16 third-level page tables) = 4608 bytes.

First, the stack, data and code segments are at addresses that require having 3 page tables entries active in the first level page table. For 64K, you need 256 pages, or 4 third-level page tables. For 600K, you need 2400 pages, or 38 third-level page tables and for 48K you need 192 pages or 3 third-level page tables. Assuming 2 bytes per entry, the space required is 1024 * 2 + 256 * 3 * 2 (3 second-level page tables) + 64 * (38+4+3)* 2 (38 third-level page tables for data segment, 4 for stack and 3 for code segment) = 9344 bytes.

Explanation:

16 E the answer

After this program is executed, the value of numc is 10. Choose the connective that completes the program.

numA = 2
numB = 3
if numA == 2 (or,and,not) numB = 2:
numC = 30
elif numA == 2 and numB == 3:
numC = 10

Answers

Using logical operators, it is found that the connective that completes the program is and.

What are the logical operators?

The and operator between multiple conditions is true if all of them are true.

The or operator between multiple conditions is true if at least one of them is true.

In this problem:

The variable numC will be attributed a value of 10 if the else clause is called.

The else clause is called if numA == 2 (or,and,not) numB = 2 is false. We have that numA = 2, numB = 3, hence one of the clauses is true and the other is false. Since we want the clause to be false, the and operation has to be called, which means that and is the connective that completes the program.

You can learn more about logical operators at https://brainly.com/question/13382096

2 + 2 equals 5. why is this true?

Answers

Answer:

The phrase “two plus two equals five” was made famous by George Orwell’s dystopian classic Nineteen Eighty-Four (1949). In that story, the totalitarian government that ruled Oceania brainwashed its citizens to say and believe absurd things.

A ____________________ machine is used to gather or arrange in their proper sequence.

Answers

Answer:

A collating machine is used to gather or arrange in their proper sequence.

Explanation:

The output of a computer can be seen on ( monitor, keyboard or mouse )​

Answers

Answer:

monitor

Explanation:

keyboard and mouse are inputs

Answer:

I'm pretty sure it's monitor

Explanation:

Why is it important for organizations to make strong commitment to Cloud at scale?

• because organizations can transform by focusing solely on Cloud Tech

• because moving to the Cloud Gary tees the organization’s data will be secure

•because moving to the Cloud adoption lead to greater value achieved

•because higher levels of Cloud adoption lead to greater value achieved

Answers

The reason why us crucial for organizations to make strong commitment to Cloud at scale is because organizations can transform by focusing solely on Cloud Tech.

This will help the company to drive business agility as well as  streamlining operations with reduce costs.

What is usefulness of cloud technology?

cloud technology helps the companies to scale as well as adapt at speed and accelerate innovation.

Learn more about cloud technology at;

https://brainly.com/question/9759640

Why would a programmer use a “public” variable for something like speed? Provide at least two other examples of variables a developer would likely make “public.”

Answers

It is useful for things that you don't need to redefine, and you may need to use to compute different things (such that you have different modules/functions to compute each one of these things).

What is a public variable?

A public variable is a variable that any function, sub procedure, or module can access without restriction.

Thus, if you want to define a variable only once and be able to call it from different functions or modules when you need it, you would want to make it a public variable.

An example with speed is:

You can make a simple code that for an initial speed computes the position vs time graph.

But you may want to expand that program, let's say that you make a module that also allows you to find the momentum or something like that (where you also need to use the speed).

Then defining the speed as public, is useful, as you can only call it with the module or function that you use to find the momentum.

Another example, maybe more complete.

Assume that you work with radiation physics. You define a mean energy of radiation (this would be the energy of the x-rays for example).

Now if you define that variable as public, you could use it for a lot of modules to compute a lot of different things, like fluency, kermas, etc.

Things that are really complex to compute and you may have the codes for each one in different modules/functions.

So it is really useful when you already had several codes that work with the same variable.

If you want to learn more about variables, you can read:

https://brainly.com/question/15683939

If I connect my Phone to my laptop screen and the screen on my phone is mirroring to my laptop if I try clicking on something with my laptop will the change happen on my phone

Pls answer will mark Brainlyest

Answers

yes it will please mark brainly ed

which type of measurement would you use to determine the mass of sugar?

Answers

Answer:

kg

Explanation:

What is output by the following line of code?

print(mystery("hello"))
Group of answer choices

Answers

Answer:int x = 5;

if(x < 5)

cout << "line 1 ";

cout << "line 2";

A. line 1 line 2 B. line 1 C. line 2

D. line 1 E. line 1line 2

line 2

2. What would be output by the following code? _______

int x = 0;

while(x < 5)

{

cout << x << " ";

x++;

}

A. 0 1 2 3 4 5 B. 1 2 3 4 5 C. 0 1 2 3 4

D. 0 E. 0 0 0 0 0

3. After execution of the following code, what will be the value of input_value if the value 3 is entered at the keyboard at run time? ________

cin >> input_value;

if (input_value > 5)

input_value = input_value + 5;

else if (input_value > 2)

input_value = input_value + 10;

else

input_value = input_value + 15;

a. A. 8

b. B. 13

c. C. 18

d. D. 0

e. E. 5

4. What would the user see displayed on the screen after the following lines of code are executed?¬¬________

int i = 6;

if (i == 10)

cout << “value: “ << i;

else

cout << "hmmm";

A. value: i B. value: 10

C. hmmm D. value: ihmmm

E. value: 10

Hmmm

5. What is the output of the following lines of code? ______

for(int i=0; i<4; i++)

cout << (i * 3) << " ";

A. 0 1 2 3 4 B. 0 3 6 9

C. 0 3 6 9 12 D. 0 1 2 3 E. 0 0 0 0

Explanation:

Which of the following factors is least likely to result in delivery delays?

Answers

There are different factors that leads to delay in deliver. The most common factors that leads to delayed delivery are known as Misspelt, incomplete or outdated address.

What causes delay in delivery?

There are Mistakes that leads to delay in delivery process. Example is a misspelled address, incorrectly details in forms that has been filled, and also incomplete information.

The above are known to be key factors or reasons for inaccurate or late deliveries.

Learn more about delay in delivery from

https://brainly.com/question/12938965

Create a simple JavaScript calculator.

Answers

Answer: edit out anything you dont need

<!DOCTYPE html>  

<html lang = "en">  

<head>  

<title> JavaScript Calculator </title>  

 

<style>  

h1 {  

   text-align: center;  

   padding: 23px;  

   background-color: skyblue;  

   color: white;  

   }  

 

#clear{  

width: 270px;  

border: 3px solid gray;  

   border-radius: 3px;  

   padding: 20px;  

   background-color: red;  

}  

 

.formstyle  

{  

width: 300px;  

height: 530px;  

margin: auto;  

border: 3px solid skyblue;  

border-radius: 5px;  

padding: 20px;  

}  

 

 

 

input  

{  

width: 20px;  

background-color: green;  

color: white;  

border: 3px solid gray;  

   border-radius: 5px;  

   padding: 26px;  

   margin: 5px;  

   font-size: 15px;  

}  

 

 

#calc{  

width: 250px;  

border: 5px solid black;  

   border-radius: 3px;  

   padding: 20px;  

   margin: auto;  

}  

 

</style>  

 

</head>  

<body>  

<h1> Calculator Program in JavaScript </h1>  

<div class= "formstyle">  

<form name = "form1">  

     

   <!-- This input box shows the button pressed by the user in calculator. -->  

 <input id = "calc" type ="text" name = "answer"> <br> <br>  

 <!-- Display the calculator button on the screen. -->  

 <!-- onclick() function display the number prsses by the user. -->  

 <input type = "button" value = "1" onclick = "form1.answer.value += '1' ">  

 <input type = "button" value = "2" onclick = "form1.answer.value += '2' ">  

 <input type = "button" value = "3" onclick = "form1.answer.value += '3' ">  

  <input type = "button" value = "+" onclick = "form1.answer.value += '+' ">  

 <br> <br>  

   

 <input type = "button" value = "4" onclick = "form1.answer.value += '4' ">  

 <input type = "button" value = "5" onclick = "form1.answer.value += '5' ">  

 <input type = "button" value = "6" onclick = "form1.answer.value += '6' ">  

 <input type = "button" value = "-" onclick = "form1.answer.value += '-' ">  

 <br> <br>  

   

 <input type = "button" value = "7" onclick = "form1.answer.value += '7' ">  

 <input type = "button" value = "8" onclick = "form1.answer.value += '8' ">  

 <input type = "button" value = "9" onclick = "form1.answer.value += '9' ">  

 <input type = "button" value = "*" onclick = "form1.answer.value += '*' ">  

 <br> <br>  

   

   

 <input type = "button" value = "/" onclick = "form1.answer.value += '/' ">  

 <input type = "button" value = "0" onclick = "form1.answer.value += '0' ">  

   <input type = "button" value = "." onclick = "form1.answer.value += '.' ">  

   <!-- When we click on the '=' button, the onclick() shows the sum results on the calculator screen. -->  

 <input type = "button" value = "=" onclick = "form1.answer.value = eval(form1.answer.value) ">  

 <br>  

 <!-- Display the Cancel button and erase all data entered by the user. -->  

 <input type = "button" value = "Clear All" onclick = "form1.answer.value = ' ' " id= "clear" >  

 <br>  

   

</form>  

</div>  

</body>  

</html>  

Explanation:

What is the difference between formatting and conditional formatting?​

Answers

Answer:

Conditional formatting only applies formatting to your cells, based on the values (text, numbers, dates, etc.) in those cells. Format~ arrange or put into a format.

Explanation:

Rachel made a mistake when typing. She typed the wrong label in cell A2. To fix this, she should _____. press Tab until cell A2 is highlighted and press Enter click on cell A2 and press Tab double-click on cell A2 and retype the label click on cell A2, press Backspace, and type the new label

Answers

Answer:

double-click on cell A2 and retype the label click on cell A2

Explanation:

What types of company functions are aided by ERP?

Answers

Answer:

These activities include accounting, project management, attendance management, managing merchant details, attendance management, compliance and employee management.

Which of the following statements describe the benefits of a career in transportation, distribution, and logistics (TDL)?

Answers

The statement that describes the benefits of a career in transportation, distribution, and logistics (TDL) is:

It seeks to reduce logistics costs for the company and increase satisfaction for buyers.

What is a career in transportation, distribution, and logistics (TDL)?

It is that career that evaluates what is relevant to logistics transport, that is, it ensures that the merchandise reaches the consumer in the right place and time, taking into account distribution and logistics.

Benefits of a career in transportation, distribution, and logistics (TDL)

It determines the efficiency of the company, being the key the optimization of the TDL and turning it into a competitive advantage to better position itself in the market.

Promote consumer satisfaction and confidence through an optimal logistics transport service.

Therefore, we can conclude that the a career in transportation, distribution, and logistics (TDL) helps the company to gain consumer trust.

Learn more about Transportation, distribution, and logistics here: https://brainly.com/question/25474654

Write a program in Java to implement a recursive boolean function verify that returns True if the given array contents remain the same when array is reversed, i.e., when last element is equal to the first element, second last element is equal to the second element and so on. Otherwise function verify must returns False. Examples: Input: arr[] = {12, 32, 67, 32, 12} Output: True Input: arr[] = {1, 2, 3, 4, 5} Output: False

Answers

Answer:

class Main {

 public static boolean verify(int[] a) {    

   for(int i=0;i<a.length/2;i++) {

     if (a[i] != a[a.length-i-1]) {

       return false;

     }

   }

   return true;

 }

 public static void main(String[] args) {

   int arr1[] = {12, 32, 67, 32, 12};

   int arr2[] = {1, 2, 3, 4, 5};

   System.out.println("arr1: " + (verify(arr1) ? "True" : "False"));

   System.out.println("arr2: " + (verify(arr2) ? "True" : "False"));

 }

}

Explanation:

This is called a palindrome.

Why is sequencing important? in coding

Answers

Explanation:

It is crucial that the steps in an algorithm are performed in the right order - otherwise the algorithm will not work correctly.

Answer:

if you have the same pass each time that hard to guess if u use it over and over no one will know. Thats why its important

Explanation:

Majken is turning 18 years old soon and wants to calculate how many seconds she will have been alive.
Her code looks like this:
numYears ← 18
secondsInDay ← 60 * 60 * 24
Which code successfully calculates and stores the total number of seconds?
️Note that there may be multiple answers to this question.
Choose all answers that apply:
Choose all answers that apply:

(Choice A)
A
totalSeconds ← secondsInDay * 365 * numYears

(Choice B)
B
totalSeconds ← numYears * 365 * secondsInDay

(Choice C)
C
totalSeconds ← secondsInDay * 365 % numYears

(Choice D)
D
totalSeconds ← secondsInDay / 365 / numYears

(Choice E)
E
totalSeconds ← secondsInDay * 365 + numYears

(Choice F)
F
totalSeconds ← (numYears * 365) * secondsInDay

Answers

Answer:

I choose D :)

Explanation:

How are the aims of science and technology different?

Answers

Answer:

goal of technology is to create products that solve problems and improve human life.

Explanation:

The words science and technology can and often are used interchangeably. But the goal of science is the pursuit of knowledge for its own sake while the goal of technology is to create products that solve problems and improve human life.

five real world objects with similar characteristics​

Answers

Our current scientific knowledge in areas such as human visual perception, attention, and memory, is founded almost exclusively on experiments that rely upon 2D image presentations. However, the human visuomotor system has largely evolved to perceive and interact with real objects and environments, not images (Gibson, 1979; Norman, 2002).

a user complains he cannot access a particular website, although he is able to access other websites. At which layer of the OSI model should you begin troubleshooting​

Answers

Answer:

Layer 7: Application Layer

Explanation:

Layer 7 is the Application layer and the website that causing issue is used through an app. Making it Layer 7 Application.

What online game do you play on the internet and can I play with you on it? I play downtown mafia 1960

Answers

Answer:

crazygames.com

Explanation:

Upload your completed project including the following:

An outline with the following items:
information about plants and animals that have become extinct or endangered because of a loss of habitat
information about habitats that have changed radically over the last few decades
ways students can lead a "greener" lifestyle
Recycle. There are many things you use each day that can be recycled. Some of these include paper, plastics, glass, and aluminum cans.
Conserve water. Take shorter showers. Turn off the water when brushing your teeth. This will reduce the amount of water that you use.
Don't pollute. Hold on to that helium balloon. Balloons that are released into the air can kill wildlife. Animals swallow the balloons, causing them to suffocate or starve.
Use energy wisely. Replace your incandescent light bulbs with fluorescent bulbs. They are more efficient than regular light bulbs. Turn off the lights, computers, and music when you're not using them.
Reduce consumption. Use both sides of the paper when taking notes in class. If your printer has a feature that lets you print on both sides of a sheet of paper, use it.
Presentation slides with text, graphics, and special effects such as animation and transitions
Support materials
Presentation delivery

Answers

Answer:Many animals and plants have become extinct or endangered due to human error. In fact about 1 million species are in danger of becoming extinct. Orangutans are becoming extinct due to deforestation. Too many trees are being cut down leaving them without a way to survive. Carnivorous plants are also at risk due to damaged environment.

Explanation: YWW FRIEND!!

Answer:Many animals and plants have become extinct or endangered due to human error. In fact about 1 million species are in danger of becoming extinct. Orangutans are becoming extinct due to deforestation. Too many trees are being cut down leaving them without a way to survive. Carnivorous plants are also at risk due to damaged environment.

Explanation:

She copied that from another person Ima refund this

How to connect two monitors for one desktop

Answers

Answer:

two HDMI cords, this will help you your monitors

you get a cord that connects the 2 called a HDMI cord

Explain why people struggle to control themselves when they engage with social media

Answers

Explanation:

Because social media attract us . Probably social

media is controlling our lives from many years.

Most people struggle to get away from social

media as it has made people lazy.

They are aware of what they enjoy and avoid engaging with something that offends them.

What is social media?

Social media is defined as a computer-based technology that makes it easier for people to communicate and share information through online communities and networks. In relation to media, the term "social" implies that platforms are user-centric and encourage social interaction. Social media can therefore be seen as an online facilitator or enhancer of human networks, which are webs of people who improve social connectedness.

If they are unable to maintain an online presence, their inherent curiosity and susceptibility to FOMO might cause them to become nervous. These consumers utilize social media to escape their own realities. Studies have linked social media use to unfavorable effects such an increase in anxiety, stress, depression, body image issues, and loneliness in teenagers and young adults.

Thus, they are aware of what they enjoy and avoid engaging with something that offends them.

To learn more about social media, refer to the link below:

https://brainly.com/question/29036499

#SPJ2

what happens when you create a variable in a video game program?​

Answers

Answer:

A lot can happen, depending on the use of the variable

Explanation:

Lets create a position variable, a common variable in games.

Vector3 position = new Vector3(0, 0, 0);

The above variable initialization creates a new Vector3 object. The Vector3 class contains 3 properties, X, Y, and Z. When you assign the variable 'position' the new Vector3 object, the variable 'position' contains an instance of Vector3 where

X = 0,

Y = 0,

and Z = 0.

The variable 'position' can be used to set the position of a player, or an object.

We can reuse this variable when you want the object or player to move.

position.X = 29

position.Y = -14

position.Z = 47

now the object/player's position is (29, -14, 47).

Variables can be used for basically everything you need in programming, from storing a position, to storing the result of a complex math equation.

Write a Python program that uses three variables. The variables in your program
will be animal, vegetable, and mineral. Assign a string value to each one of
the variables. Your program should display "Here is an animal, a vegetable, and
a mineral." Next, display the value for animal, followed by vegetable, and
finally mineral. Each one of the values should be printed on their own line.
Your program will display four lines in total.

Answers

Answer:

animal = "animal"

vegetable = "vegetable"

mineral = "mineral"

print("Here is an ")

print(animal + ",")

print("a " + vegetable + ",")

print("and finally "mineral)

Have a nice day!

Please mark as brainiest :)

Write a python program to find the volume of the pepsi present in the can which is in the shape of cylinder accepting the radius and height of the can from user.(Note :Apply float input and display Radius ,Height, Volume of Pepsi in can)
(V = pi r^2 h )

Answers

Answer:

r=float(input("Enter radius: "))

h=float(input("Enter height: "))

v=3.14*r**2*h

print(r)

print(h)

print(v)

This is the answer, hope it helped!

1 FEB 2 3 b. Your manager specifically wants you to send a letter advertising your upcoming sale of 20% off all regularly priced items in store for the weekend of April 12 and April 13. This sale is a special offer for VIP customers only. Create the form letter with fields, and use page margins for the top at 2 in, and the bottom and sides at 1 in. Submit your document to your teacher along with this worksheet.

c. Create a recipient list to send on April 3, 2014 using the information below. Submit your file to your teacher along with this worksheet. (3 points) Name: Elise Ziolkowski; Address: 1800 Clear Ave, Ferndale, CA 99825 Name: Miguel Hernandez; Address: 236 Mountain Terrace, Ferndale, CA 99825

d. Complete a mail merge using the information provided in part b of this question. Submit your documents to your teacher along with this worksheet.​

Answers

Answer:A private discount offer Just for You

20% special discount for you on all the regular priced items in the store on

April 12th and 13th.

Save the date and don't miss this special offer.

Other Questions
Burning fuels in power plants and motor vehicles emits carbon dioxide (CO2) , which contributes to global warming. The CO2 emissions (metric tons per capita) for countries varies from 0.04 in Burundi to 43.86 in Qatar. The data set, which contains information on 203 countries, is too large to display, but here are the data for the first 5 countries. Find the mean, , and the median, , for the full data set. Give your answers to three decimal places. On the table is the book.The prepositional phrase is _____.is the bookOn theOn the tablethe table is A study suggests that about 80\%80%80, percent of undergraduate students are working at a job. Researchers plan to do a follow-up study with a new sample of students. They'll use the new data to make a one-sample zzz interval to estimate the proportion of students who are working at a job. The researchers plan on using a confidence level of 90\%90%90, percent, and they want the margin of error to be no more than \pm 1\%1%plus minus, 1, percent. If we assume \hat p=0. 80 p ^ =0. 80p, with, hat, on top, equals, 0, point, 80, what is the smallest sample size required to obtain the desired margin of error?. Right. This is French, but I cant choose both subjects, so yall can help in any of both languages idrc. I just have zero sodding idea of what Im supposed to do. xD But i do understand all of the "domaines, codomaines, extrmums etc." So thank yall to all of the bilingual+ folks out there lol. What is the tundras permanently frozen layer of ground called? per-ma-frostactive soil soil frost ground layer Find the area and the circumference of a circle with diameter 7 m.Use the value 3.14 for it, and do not round your answers. PLEASE HELPWhat statement about the inheritance of mitochondrial DNA is true?A) The sperm cell donates most of the material in the cytoplasm to the zygote, including mitochondrial DNA.B) The egg and sperm cells contribute equal amounts of mitochondrial DNA to the zygote.C) The egg cell donates most of the material in the cytoplasm to the zygote, including mitochondrial DNA.D) The sperm cell donates most of the DNA in the nucleus to the zygote, including mitochondrial DNA. Precalc Help pls!!! I am stuck on this one so pls help I need help with this pls QUESTION ON PIC TY!!! we love breaking the rules and who makes the rules How does using myNav allow Accenture to help its clients become more sustainable? A car has four wheels. How many wheels are there for twelve cars? Select the correct answer.Which expression represents a quadratic expression in complete factored form?.(x + 4)(x-3)B.(2x+4)(x+3)C.(x - 1)(3x-9)D.(x-2) + (x + 3) in regions where the suns rays hit at an angle, solar energy is______ and climate is _____. A. Focused, cool. B. Focused, warm. C. Spread out, cool. D. Spread out, warm A prisoner __________ is a civil lawsuit filed by an inmate alleging violations of his or her rights. Which pair of angles are vertical angles?(A) ABF and FBD(B) FBD and CBD(C) ABF and CBE(D) CBE and ABF 4% of an unknown number is 5. what is the unknown number Jenna graphed a circle centered at the origin which goes through the point(15, -8). What is the radius of that circle? How is a scientific theory developed?