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
What is the simplest way to permanantly get rid of an unwanted file
UNO [17]
If on a computer, if thee computer says they put it in the recycling bin, the go to the recycling bin and right click and delete. If a paper, throw away. If other, do what your body desires to do.<span />
4 0
3 years ago
A check list should be based on that apply to your industry.
frozen [14]
Can you please elaborate? This is as your question isn't very clear.
6 0
3 years ago
Read 2 more answers
3. Cellular phone technology works on a system of geographically separated zones
Nataly [62]

Answer:

Cellular phone technology works on a system of geographically separated zones

called

B. Cells

8 0
3 years ago
Define Based Assessment ​
Oduvanchick [21]

Explanation:

In an educational setting, standards-based assessment is assessment that relies on the evaluation of student understanding with respect to agreed-upon standards, also known as "outcomes". The standards set the criteria for the successful demonstration of the understanding of a concept or skill -WIKIPEDIA

8 0
3 years ago
50 points please!!
MA_775_DIABLO [31]

Answer:

poopypoopypoopypoopy

6 0
3 years ago
Other questions:
  • My computer have black spots and line
    7·2 answers
  • Suppose we provide a new implementation of the transport layer protocol tcp providing the same functionality using different alg
    14·1 answer
  • A list of pages within a Web site that you have visited and that usually appears at the top of a page is referred to as a(n) ___
    14·1 answer
  • List at least 4 types of works covered by copyright law
    5·1 answer
  • William wants to create a document using a DTP<br> what time saving techniques can he use?
    9·1 answer
  • Tara is creating a presentation for her science project about volcanoes. She added different animations to every slide for empha
    12·1 answer
  • Which of these is NOT a standard part of the outro of a podcast?
    15·1 answer
  • Im boing exam help please In a category-based course grading system, teachers weigh a student's performance in all courses. all
    7·2 answers
  • What code would you use to create the login button?
    11·1 answer
  • Question 1(Multiple Choice Worth 5 points)
    9·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!