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
Contact [7]
3 years ago
15

If necessary, create a new project named Advanced19 Project, and save it in the Cpp8\Chap06 folder. Enter (or copy) the instruct

ions from the Lab6-2.cpp file into a new source file named Advanced19.cpp. Be sure to change the filename in the first comment. The program should now begin by determining the number of medium pizzas and the number of large pizzas the customer is ordering. Be sure to verify that both numbers are greater than or equal to 0. Rather than displaying the price of one pizza, the program should display the number of pizzas ordered and the total cost of the order. The $2 coupon toward the purchase of a large pizza can be used only once. If a customer orders more than four pizzas, the program should deduct 10% from the cost of the order. Modify the program appropriately, and then save, run, and test it
Computers and Technology
1 answer:
Digiron [165]3 years ago
4 0

Answer:  If a customer orders more than four pizzas, the program should deduct 10% from the cost of the order. Modify the program appropriately, and then save, run, and test it.

You might be interested in
Identify when programmers use an Else statement.
Gnesinka [82]

Answer:

to tell the program to take a different action when the If statement answer is false

Explanation:

if x = 0:

     print('x equals 0')

else:

      print('x equals something else that isnt 0')

4 0
3 years ago
Read 2 more answers
How does modularity provide flexibility in a structured programming design?
Elanso [62]

Modular programming is the process of subdividing a computer program into separate sub-programs. Modularity provides flexibility in a structured programming design the following way: Modularity enables multiple programmers to work on a program at the same time. Correct answer: A

It provides developers flexibility in module maintenance.This makes the program easier to read and understand.

4 0
3 years ago
Write a program, NumberStatistics.java, that reads an unspecified number of integers. The program ends with the input 0. The pro
Lerok [7]

Answer:

Following are the program, which can be below:

import java.util.*; //defining header file

public class NumberStatistics  //defining class NumberStatistics

{

public static void main(String[] arc) //defining main method

{

int total_number=0,max_val=0,min_val=0,neg_val=0,pos_val=0,neg_count=0,pos_count=0,x; //defining variables

Scanner ox= new Scanner(System.in); //creating Scanner class Object

System.out.println("Enter positive and negative value with sign and when complete inter 0:"); //print message  

x= ox.nextInt(); //input value from user

while(x!=0) //defining loop to check input value is 0

{

total_number++; // increment value

if(total_number == 1)  //defining conditional statement to check minimum and maximum value

{

max_val = x; //assign value in max  

min_val = x;//assign value in min

}

else  //defining else block

{

if(max_val < x) //check maximum value

{

max_val = x; //assign maximum value

}

if(min_val > x) //check minimum value

{

min_val = x; //assign minimum value

}

}

if(x > 0) //input values  

{

pos_count++; //count positive value

pos_val+=x; // add positive values

}

else  

{

neg_count++;//count negative value

neg_val+=x; // add negative values

}

x = ox.nextInt(); //input values

}

// defining conditionl statement

if(total_number != 0)  // defining if block to print all value

{

System.out.println("positive value average= "+(pos_val/(double)pos_count));

System.out.println("negative values Average= "+(neg_val/(double)neg_count));

System.out.println("all values average= "+(pos_val+neg_val)/(double)total_number);

System.out.println("maximum value = "+max_val+"\n"+" minimum value = "+min_val);

}

else  

{

System.out.println("no positive values found");

System.out.println("no negative values found");

}

}

}

Output:

Enter positive and negative value with sign and when complete inter 0:

12

8

04

22

-22

-5

9

0

positive value average= 11.0

negative values Average= -13.5

all values average= 4.0

maximum value = 22

minimum value = -22

Explanation:

The Description of the above java program can be described as follows:

  • In the above code first we import the package for user input, then defines the variable "total_number,max_val,min_val,neg_val,pos_val,neg_count, pos_count,x" to store the value prints its value.
  • In the next step, a scanner class object is created for user input and defines a while loop, that checks input value isn't equal to 0, inside the loop a conditional statement defines that cont and calculates all positive, negative, and all values addition.
  • At the another conditional statement is defines, that prints all value average, and also prints maximum, minimum value.
6 0
4 years ago
It is better to refuse to take a field sobriety test than to take a chance on being convicted of a DUI
Sliva [168]
I would refuse. if you dont refuse they can get probable cause
7 0
3 years ago
Functions are ideal for use in menu-driven programs. When a user selects a menu item, the program can_______ the appropriate
Masteriza [31]

Answer:

a. call

Explanation:

According to my research on function, I can say that based on the information provided within the question the program can call the appropriate function. A function is a piece of code that completes a single task when called upon. Calling is another way of just saying that your telling the function to run its code at that given moment.

I hope this answered your question. If you have any more questions feel free to ask away at Brainly.

4 0
3 years ago
Other questions:
  • How are the internet and the World Wide Web different from each other
    14·1 answer
  • Which of the four basic functions of a computer refers to the collection of data by a computer?
    11·2 answers
  • Which of the following commands contains an error?
    8·1 answer
  • Nate wants to copy the style of his contact address to the normal template. Complete the paragraph to describe how he can access
    6·1 answer
  • What is the difference between line art and continuous tone copy?
    14·1 answer
  • Who can search the internet and select element base on important words
    13·1 answer
  • Which tool can be used to increase the space between a bullet point or a number and text?
    11·2 answers
  • What can i say back to my IT school lady?
    8·1 answer
  • Create a mobile app plan using PowerPoint slides to show mock-ups of screens,
    6·1 answer
  • can i get an access code for free online? if yes, what website is it so i can get a free access code?​
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!