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
a. Show the output of the following program: 1: public class Test { 2: public static void main ( String [] args ) { 3: A a = new
faust18 [17]

Answer:

See attached file.

Explanation:

See attached file.

Download txt
3 0
3 years ago
a limited-access expressway. A)allows vehicles to enter or exit only at certain place.B) does not permit trucks or buses.C)has n
zepelin [54]
Hello babe I just wanted to say hello
3 0
2 years ago
When attaching a file or files in outlook 365 you select the attach command and then select the files location
mamaluj [8]

Answer:

When you click the attachment button a window pops up allowing you to select the file/s you want to upload

You can also drag and drop file/s this is an alternative method

Explanation:

Microsoft Outlook is a personal information manager software system from Microsoft.

Though primarily an email client, Outlook also includes such functions as calendaring, task managing, contact managing, note-taking, journal logging, and web browsing. Wikipedia

3 0
2 years ago
Which game would be classified as an advergame? A. Tomb Raider B. Fifa Soccer C. Prince of Persia D. Flower
Vikentia [17]

Answer:

B

Explanation:

I think

8 0
3 years ago
What is the check digit for the following original product number: 140501941 ? *
Natasha_Volkova [10]

Explanation:

I think it is 7, but I could be wrong..... sorry

8 0
2 years ago
Read 2 more answers
Other questions:
  • The /tmp directory is a temporary directory and will not exist on a system at all times. True or False?
    15·1 answer
  • What component of a computer system holds the operating system when the computer is not running
    6·2 answers
  • Who is the owner of microsoft company​
    12·1 answer
  • Microsoft has developed the Active Directory Domain structure so that a central authority, called the __________, is the reposit
    7·1 answer
  • For demultiplexing a UDP socket is identified by:_____.
    15·1 answer
  • Answer this question for points lol
    7·2 answers
  • Which descriptions offer examples of Correction Services workers? Select all that apply.
    8·1 answer
  • The Self-Quiz gives you an opportunity to self-assess your knowledge of what you have learned so far.
    13·1 answer
  • Summary about Interface Design in system analysis
    12·1 answer
  • What is one way a pivottable could combine the following data?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!