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
lbvjy [14]
3 years ago
10

Please code this in c++

Computers and Technology
1 answer:
katrin [286]3 years ago
5 0

Answer:

See explaination

Explanation:

#include<iostream>

#include<fstream>

using namespace std;

int main(){

double price, totalPrice = 0, weight;

string product, filename;

cout<<"Enter filename: ";

cin>>filename;

ifstream fin;

fin.open(filename.c_str());

while(fin>>product>>price){

cout<<"Enter weight for "<<product<<": ";

cin>>weight;

totalPrice+=price*weight;

}

cout<<"\nThe total cost of the purchase: $"<<totalPrice<<endl;

return 0;

}

You might be interested in
Which is the another name of automatic sequence control calculator​
Alla [95]

Answer:

IBM Automatic Sequence Controlled Calculator (ASCC)

3 0
3 years ago
What did Muhammad do when he encountered opposition from Mecca’s city leaders? He brought more followers to Mecca. He relocated
Rudiy27

Answer:

He relocated from Mecca to the city of Medina.

Explanation:

5 0
3 years ago
Read 2 more answers
Devices used for viewing images from one computer to another over the internet
garri49 [273]
Its a monitor otherwise the screen on a computer
3 0
3 years ago
Code a call to function aNonclassFunction passing co.
Doss [256]

Answer:

a)aNonclassFunction (co);

Explanation:

When we call a function we just have to write the name of the variable that we are passing to the function.We don't have to write any operator.

So the function call is like this:-

function_name(var_name);

In our case it is

aNonclassFunction(co);

Hence the answer is option a.

6 0
3 years ago
: Chronic state of ____________________, unrealistic &amp; excessive worry about two or more life ____________________
suter [353]

The Chronic state of  generalized anxiety disorder is an unrealistic and excessive worry about two or more life that  last for at least six months.

<h3>What disorder is chronic worry?</h3>

Generalized Anxiety Disorder, GAD, is known to be a form of an anxiety disorder that is known by:

  • chronic anxiety
  • exaggerated worry
  • tension and others.

Note that it is also called an excessive or unrealistic worry in regards to life circumstances that is said to occur for about at least six months.

Hence, The Chronic state of  generalized anxiety disorder is an unrealistic and excessive worry about two or more life that  last for at least six months.

Learn more about Generalized Anxiety Disorder from

brainly.com/question/22676443

#SPJ1

6 0
2 years ago
Other questions:
  • Select the correct statement(s) regarding digital baseband modulation.
    7·1 answer
  • Orifice tubes are A. coded in American models only. B. coded by number for easy identification. C. similarly but not exactly siz
    12·1 answer
  • Write the definition of a method named countPos that receives a reference to a Scanner object associated with a stream of input
    13·1 answer
  • Whoever answers first gets lots of points
    14·2 answers
  • A network administrator needs 10 prevent users from accessing the accounting department records. All users are connected to the
    10·2 answers
  • Abby has always dreamed of having her own ice cream shop. Now as a young entrepreneur she has decided to pursue her dream, but s
    13·1 answer
  • Which memory can be removed from motherboard? RAM OR ROM?​
    7·1 answer
  • Paolo, a popular basketball player in school was asked by his coach, how is your family
    8·1 answer
  • F
    9·1 answer
  • According to Chargaff's data, ________ must pair with ________, and ________ must pair with ________.
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!