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
In Fantasy Football, participants compete against one another by choosing certain players from different NFL teams that they thi
PolarNik [594]

This process that would be considered in the above scenario is Data mining.

<h3>What is data mining?</h3>

Data mining is known to be the act or method of knowing more about data via;

  • Leaning raw data.
  • Finding patterns.
  • Forming models.
  • Testing those models.

Note that  It is a method that uses statistics, machine learning, and database systems and it will be good tool to be used in the scenario above.

Learn more about Data mining from

brainly.com/question/14776357

4 0
1 year ago
your teacher has accidentally put the wrong names of the students on her excel science results sheet. What method can be used to
Shtirlitz [24]

Answer:

Explanation:

Excel has a built-in function that allows you to type in a word, letter, or number and it will automatically find every one of that entry and replace it with whatever you want. To do this you simply click on Home > Find & Select > Replace and fill out the information. Once the info is completed click Replace All. This shows exactly why it is way better to do these result sheets on the computer as opposed to on a piece of paper, it allows you to automate everything and fix multiple mistakes with a simple button click.

6 0
2 years ago
If your cousin wanted to view information from the world wide web, what application software would you tell her to be sure she h
MAVERICK [17]
Well, I would say a web browser, like Mozilla Firefox, Safari for IOS, Windows Edge, Chrome, or Internet Explorer; and some anti-malware software, since there are multiple websites on the WWW that try to steal your information and give your device viruses.
6 0
3 years ago
An HP PC does not support the HP System Board Configuration tool, and you must use the HP System Board Replacement and System Di
GuDViN [60]

Answer:

Press F2 to see if the System Diagnostics or Hardware Diagnostics UEFI menu displays.

Explanation:

Start the HP BIOS Setup utility and view the Advanced > Diagnostics screen for supported diagnostics.

Boot to Windows and launch HPSA. Search for HP PC Hardware Diagnostics UEFI.

All HP commercial products manufactured after 2009 have HP PC Hardware Diagnostics UEFI installed on the hard drive.

7 0
3 years ago
Write a menu-based program in C++ for an input restricted dequeue using Linked List consist of
Natali5045456 [20]

Answer:

C++ With Examples

— Input-restricted Deque: In input-restricted, deletion can be done from ... getLast: Retrieves the last item in the queue. ... Now, we insert element 3 at the rear.

8 0
2 years ago
Other questions:
  • A ________ is a set of programs that manipulate the data within a database.
    12·1 answer
  • All of the following are examples of a web application except for ______.
    12·2 answers
  • Your organization will be handling market trades. You will be required to verify the identify of each customer who is executing
    8·1 answer
  • The labels button is found under the
    7·2 answers
  • To more easily incorporate methods into a program, it is common practice to store methods in their own classes and files. Then y
    6·1 answer
  • write the program or pseudocode algorithm that computes the product and average of three integers and display the results​
    7·1 answer
  • "Packet switches have multiple links attached to them. For each attached link the packet switch has a/an ____________, which sto
    7·1 answer
  • 3.17 (LAB) Ch 5 Warm up: Drawing a right triangle (Python 3) This program will output a right triangle based on user specified h
    10·1 answer
  • Which of these statements about tags is false?
    12·1 answer
  • Which of the following is typiacally the last step of the mail merge process
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!