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
wolverine [178]
3 years ago
11

A drink costs 2 dollars. A taco costs 5 dollars. Given the number of each, compute total cost and assign to totalCost. Ex: 2 dri

nks and 3 tacos yields totalCost of 19.
int drinkCount = 4, tacoCount = 6;
// std::cin>>drinks >> tacos; // you may read values from input stream
int drinkCost = 2, tacoCost = 4;
int totalCost = drinkCount * drinkCost + tacoCount * tacoCost ;
// std::cout << totalCost; // you may want print total cost
Computers and Technology
1 answer:
evablogger [386]3 years ago
3 0

Answer:

OKKKkkkkkkayyyy

You might be interested in
Create a program to deteate a program to determine whether a user-specified altitude [meters] is in the troposphere, lower strat
allsm [11]

Answer:

#include <iostream>

using namespace std;

int main()

{

   float altitude;

   cout<<"Enter alttitude in meter";

cin >>altitude;

if(altitude<0 || altitude > 50000)

{

   cout<<"Invalid value entered";

   return 0;

}

else{

   if(altitude<= 10000)

   {cout <<"In troposphere "<<endl;}

   

   else if(altitude>10000 && altitude<=30000)

   {cout <<"In lower stratosphere"<<endl;}

   

   else if(altitude>30000 && altitude<=50000)

   {cout <<"In upper stratosphere"<<endl;}

   

}

   return 0;

}

Explanation:

Define a float type variable. Ask user to enter altitude in meters. Store value to altitude variable.

Now check if value entered is positive and less than 5000,if its not in the range of 0-50,000 display a termination message and exit else check if it's in less than 10000, in between 10000 and 30000 or in between 30000 and 50000.

10,000 is above sea level is troposphere.

10,000-30,000 is lower stratosphere.

30,000-50,000 is upper stratosphere.

8 0
4 years ago
Data in the form of digits is called
Flauer [41]
Numeric data because it consist of numbers
5 0
2 years ago
How is a non-disclosure agreement an important tool for businesses?
Sloan [31]

Answer:

D

Explanation:

4 0
3 years ago
Read 2 more answers
What is the term for the era created by the digital revolution?
Ahat [919]
Technological innovation
8 0
3 years ago
What is the appropriate formula used to determine the area of a surface
Sholpan [36]

Answer:

om2

Explanation:

5 0
4 years ago
Read 2 more answers
Other questions:
  • What is the definition of framerate?
    7·1 answer
  • Discussion group may have a___________ who monitors the postings and enforces the sides rules​
    13·1 answer
  • Which of the following is NOT true about variables?
    13·1 answer
  • As a safe driver, you cannot, __________
    13·1 answer
  • How do i build a supercomputer.?
    11·1 answer
  • Andy, a developer, is designing a new program. Which tool should Andy use to help him complete his task?
    13·1 answer
  • Complete the steps to evaluate the following
    13·2 answers
  • Write a program that uses nested loop or for statements to display Pattern A below, followed by an empty line and then another s
    5·1 answer
  • When would it be necessary to edit the information shown on an electronic business card?
    5·2 answers
  • How many times should the start function be defined in a program?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!