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

Write assembly programs with the following I/O

Computers and Technology
1 answer:
Nat2105 [25]3 years ago
5 0

Answer:

Explanation:

copy to code:

#include <iostream>

#include <string>

using namespace std;

int main()

{

//total bill amount

float totalBill=0;

//no of customers

int noOfCustomer=0;

//no of drinks

int noOfDrinks;

//drink type

char drinkType;

//no of sandwiches

int noOfSandwiches;

int sandWitchSize;

cout<<"Enter the number of customers : ";

cin>>noOfCustomer;

//loop through no of customers

for(int i=1;i<=noOfCustomer;i++){

totalBill=0;

cout<<"Enter how many drinks ? ";

cin>>noOfDrinks;

cout<<"Enter what kind of drink (S=Soda ,W=Water) ";

cin>>drinkType;

if(drinkType=='w' || drinkType=='W'){

totalBill +=noOfDrinks*1;

}else if(drinkType=='s' || drinkType=='S'){

totalBill +=noOfDrinks*2;

}

cout<<"How many Sandwiches : ";

cin>>noOfSandwiches;

cout<<"What size of sandwich (10/12 inches) ? :";

cin>>sandWitchSize;

if(sandWitchSize==10){

totalBill+= noOfSandwiches*3;

}else if(sandWitchSize==12){

totalBill+= noOfSandwiches*5;

}

cout<<"Your total bill "<<totalBill<<endl;

}

return 0;

}

Enter the number of customers : 2

How many drinks? 2

What kind of drink(S=Soda and W=Water)? w

How many sandwiches? 3

What size of sanwich(10/12inches) ? 12

Your total bill = $ 17

How many drinks? 4

What kind of drink(S=Soda and W=Water)? s

How many sandwiches? 4

What size of sanwich(10/12inches) ? 10

Your total bill = $ 20

You might be interested in
Nathan notices his computer system is slowing down when he tries to copy documents to it . He also gets to prompt that warns wit
IRISSAK [1]
Answer:D-optical drive
3 0
3 years ago
Read 2 more answers
Which of the following symbols would not be seen in the syntax for Java variables, methods, or arguments?
Taya2010 [7]

Answer:

??

Explanation:

?? is invalid syntax

When declaring or initializing variables names, and when writing methods, or arguments ?? is not used in Java .

() [] {} all these are used with variables , methods or arguments.

4 0
3 years ago
List 2 end to end test commands. <br><br> Will mark Brainliest!!
Delvig [45]

Answer:

ibm pll

Explanation:

4 0
2 years ago
Can you please help me with Learning Binary Code to program games?
cluponka [151]
Hi There!

Binary Coding is not for games! If you want to learn coding go on a website called codeacademy!

Hope This Helps!

4 0
3 years ago
Read 2 more answers
The first computer was developed by the government to spy on communist activities. Please select the best answer from the choice
allsm [11]
The answer is False.

The first computer was not developed to spy on communist by the government. The first computer was announced in 1946, the ENIAC (Electronic Numerical Integrator and Computer). It was built for general purposes like solving large mathematical problems. The US Army designed the computer to  calculate the artillery firing tables.
3 0
3 years ago
Other questions:
  • Select the correct answer.
    8·2 answers
  • which of the following is an educated or informed guess that is proposed and supported with verifiable evidence
    12·1 answer
  • PowerPoint allows you to input files from variety of sources, such as Microsoft access.
    6·1 answer
  • What is the statement describing? Agile team continuously adapt to new circumstances and enhance the methods of value delivery
    6·1 answer
  • A simulation model includes: a. a description of the components of the system. b. a simulation clock. c. a definition of the sta
    8·1 answer
  • Comments can be compared to a virtual _____.
    7·1 answer
  • In cell B20, enter a function to calculate the average attendance for 2018
    11·1 answer
  • What do you consider to be audit evaluation areas?
    14·1 answer
  • Which of the following is an example of a runtime error?
    12·1 answer
  • 1. The Forever block is present in the<br> ......... block category.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!