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 are Layers in computer class 7. no scams please​
Bad White [126]

Answer:

This is your answer please check this ✔

7 0
2 years ago
Read 2 more answers
How does the use of imagery create meaning
Contact [7]

Imagery is a feature of written and spoken language and occurs whenever someone has chosen to use language in a non-literal way.

Imagery is a way of describing something symbolically, using words to create a picture in the reader's imagination.

In the Close Reading paper you need to be able to recognise imagery and to consider how successful the imagery is at conveying to you what the writer is trying to express. Imagery frequently conveys more than just meaning. It is used to heighten the effect of language and is often an extension of word-choice. Normally an image will extend to a phrase or a few words but sometimes it will be longer. The simplest form of imagery to recognise is when something or someone is compared to something else, with the purpose of establishing some parallel between the two. Images of this kind frequently concern qualities like beauty, speed, force, power and natural and animal traits.

6 0
3 years ago
Read 2 more answers
When the tv was created (year)
nikitadnepr [17]

Answer:

1927

Explanation:

6 0
2 years ago
Read 2 more answers
The program that solves problem 2 (a) on p.275 should be named as proj4_a.c. It must include and implement the following functio
avanturin [10]

Answer:

#include <iostream>

#include <cstring>

using namespace std;

bool isAPalindrome(char* palindrome);

int main()

{

   char palindrome[30];

   bool palindrome_check;

   cout << "Please enter an word or phrase.\n";

   cin.getline(palindrome, 30);

   palindrome_check = isAPalindrome(palindrome);

   if (palindrome_check = true)

   {

       cout << "Input is a palindrome\n";

   }

   else

   {

       cout << "Inputis not a palindrome\n;";

   }

system("pause");

return 0;

}

bool isAPalindrome(char* palindrome)

{

   char* front;  

   char* rear;  

front = palindrome;// starts at the left side of the c string

rear = (palindrome + strlen(palindrome)) - 1;//starts at the right side of the c-string. adds the c string plus the incriment value of s

while (front <= rear)

{

 if (front = rear)

 {

  front++;

  rear--;

 }

 else

 {

  return false;

 }

}

   return true;

}

7 0
2 years ago
What is a data display in which the frequencies of different values are represented by small round points?
polet [3.4K]

Answer:

Answer to the following question is Dot plot

Explanation:

A dot chart is also called the dot plot it is the type of a simple histogram like chart that is used in the statistic for relatively the small data set where the values fall into the number of a discrete bin.  

To draw the dot plots, count the numbers of data points falling in each of the bins and draw the stacks of dot that numbers high for each of the bins.

6 0
2 years ago
Read 2 more answers
Other questions:
  • Point: A Point in a two dimensional plane has an integer x coordinate value and an integer y coordinate value.
    12·1 answer
  • Which of the following best describes Roblox?
    12·2 answers
  • A field with the extend data type can contain an attached file, such as an image, document, chart, or spreadsheet.
    6·1 answer
  • List the seven basic internal components found in a computer tower
    7·1 answer
  • Sites like Zillow get input about house prices from a database and provide nice summaries for readers. Write a program with two
    12·1 answer
  • In batch operating system three job J1 J2 and J3 are submitted for execution each job involes an I/O activity a CPU time and ano
    13·1 answer
  • For this activity, you will practice being both proactive and reactive to bugs. Both are necessary to get rid of errors in code.
    5·1 answer
  • Explain the difference between overexposed vs. underexposed images?
    15·2 answers
  • MCQ: Which of the following network is confined to a relatively small area?
    5·2 answers
  • r packages include sample datasets. they also include reusable r functions and documentation about how to use the functions. Tru
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!