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
A student is helping a friend with a home computer that can no longer access the Internet. Upon investigation, the student disco
Firlakuza [10]

Answer:

Option (D) is the right answer.

Explanation:

DHCP term used as a short form of dynamic host configuration protocol, which is used to assigns the IP address automatically according to the network.

According to the scenario, the system is getting the wrong IP address that resulting in internet disconnection which is a failure of the DHCP server because it is responsible for assigning the right IP address to the system.

Hence option (D) is the most appropriate answer.

While other options are wrong because of the following reasons:

  • Static IP is the type of IP address which is fix and doesn't change in the system after rebooting, hence it has no connection in the change of IP address.
  • If the DHCP server is working well there is no chance of interference from the surrounding device.
  • Network setting has no connection with computer power supply as SMPS is used to give power and boot system only.
8 0
3 years ago
When installing wire into a terminal it is important the stripped part of the wire
lianna [129]
D is the answer.......
5 0
3 years ago
Under what circumstances does a multithreaded solution using multiple kernel threads provide better performance than a single-th
pshichka [43]

The best scenario is when a program suffers from frequent page faults. In the situations when a kernel thread experiences a page fault, another kernel thread can be switched in; something a single-threaded process will not be capable of doing. Another best circumstance is when a program has to wait for other systems events.






5 0
3 years ago
A design was operating at a maximum clock frequency of f and the clock had no jitter. if the clock started to have jitter of t s
docker41 [41]
A design was operating at a maximum clock frequency of f and the clock had no jitter. if the clock started to have jitter of t secs, what will be the new frequency?
4 0
3 years ago
Which of the following is not a type of degree of freedom?
motikmotik

Answer:

Option (B) Linear movement will be the answer.

4 0
3 years ago
Other questions:
  • Katie created a web site that automatically scales to fit a cell phone. What kind of design did Katie use?
    12·2 answers
  • A network administrator is implementing dhcpv6 for the company. the administrator configures a router to send ra messages with m
    6·1 answer
  • Which of the following would be a tradeoff of a scientific advancement that enables us to catch fish from the ocean faster than
    5·1 answer
  • Jump to Question: Fill in the blanks below: The flow of electricty is similar to the movement of water through a pipe. The movem
    15·1 answer
  • Which ergonomic principle helps to maintain good posture?
    7·2 answers
  • _____ is a program that allows a person using one computer to access files and run programs on a second computer that is connect
    11·1 answer
  • What is the purpose of the .NET Framework Class Library? a. it provides pre-written code that can be used by .NET applications b
    13·1 answer
  • Write a program that reads a list of integers, and outputs those integers in reverse. The input begins with an integer indicatin
    15·1 answer
  • 5. How would you describe the relationship between blocks of code and commands?​
    14·2 answers
  • A student can improve performance by decreasing
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!