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
Is it possible to code your own game and if so then where should I go to learn and how to publish it?
const2013 [10]

Answer:

Yes there is

Explanation:

It is scratch a coding game to do almost anything you can also code flappybird

Hope this helps.

Have fun with scratch

4 0
2 years ago
Read 2 more answers
1) Prompt the user to enter two words and a number, storing each into separate variables. Then, output those three values on a s
masya89 [10]

Answer:

import java.util.Scanner;

public class TestClock {

   public static void main(String[] args) {

 Scanner in = new Scanner (System.in);

       System.out.print("Enter favorite color:");

 String word1 = in.next();

       System.out.print("Enter pet's name:");

 String word2 = in.next();

       System.out.print("Enter a number:");

 int num = in.nextInt();

       System.out.println("you entered: "+word1+" "+word2+" "+num);

   }

}

Explanation:

Using Java Programming language

  1. Import the Scanner class
  2. create an object of the scanner class
  3. Prompt user to enter the values for the variables (word1, word2, num)
  4. Use String concatenation in System.out.println to display the output as required by the question.

7 0
3 years ago
Fill in the blank with the correct response.<br> A submenu in a text editor is indicated by a <br> .
igomit [66]

Answer:

triangle

Explanation:

7 0
3 years ago
Which tag denotes the end of an element in HTML? A. / B. * C. &gt; D. ) E. _
Lilit [14]

C. ">" denotes the end of an element. For instance <b>Hello!</b> or <hr />

6 0
3 years ago
Develop a script to demonstrate an understanding of the overload (overwrite) methods of using Python operators. This lesson will
MrRa [10]

hsjshekejeoehejeoejebenwkwuwbnwlwjdvrbrnfnfjkddjddmdmdndnfndmdkdjdjdjdjjdjdjdjdkdkdkdkdfkkdjdjdjdyremssjyehsmmamaajbshsjsbdbsksidhdbdbddddddddododododkdkdkdjdjdhddhhdvxbxbbxbxbxjdiegebeodhe

8 0
3 years ago
Other questions:
  • Write a Python program that will take as input 5 integer values and will output the average of the odd values and the average of
    6·1 answer
  • When you minimize a file, folder, or window it is placed on the
    10·1 answer
  • Brainlist will be added!✴
    6·1 answer
  • What are the three default security levels within software restriction policies?
    12·1 answer
  • ____________ occurs when a provider does not support data export or when a provider's service is unavailable through others.
    11·1 answer
  • Assuming that we only support BEQ and ADD instructions, discuss how changes in the given latency of this resource affect the cyc
    7·1 answer
  • Which of the following is true of the poka-yoke approach used for mistake-proofing processes?
    9·2 answers
  • Write bash script which takes array as an input of size 10 bind its even indexes to accept even values and odd indexes to accept
    5·1 answer
  • Use python
    9·1 answer
  • What is computer fundamental ?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!