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
VikaD [51]
3 years ago
12

Write a function that reads from a file the name and the weight of each person in pounds and calculates the equivalent weight in

kilograms. Output the Name, weightLB, and weightKG in that order. Format your output to two decimal places. (1 kilogram
Computers and Technology
1 answer:
spayn [35]3 years ago
3 0

Answer:

#include <iostream>

#include <fstream>

#include <iomanip>

using namespace std;

int main(){

   string name;

   double weightKg, weightPd;

   cout<< fixed << setprecision(2);

   fstream myFile("filename.txt");

   while (getline( myFlie, name, weightPd)){

       weightKg = weight * 0.453592;

       cout<< name << weightPd <<weightKg;

   }

   myFile.close();

}

Explanation:

The C++ source code reads in the content of a file that has a name and weight value in pounds and outputs the name, weight in pounds and the weight in kilograms.

You might be interested in
7. Explain the steps for formatting a shape ?
alisha [4.7K]

Answer:

To begin, select the shapes you want to format. To select more than one, press and hold the Shift key. When you select one or more shapes, a new Drawing Tools tab appears. Here, you can select Shape Fill to fill the selected shapes with a solid color, gradient, texture, or picture.

Explanation:

3 0
2 years ago
The default _____ color is set when you type text.
Elenna [48]
The default hyperlink color is automatically set when you type
5 0
2 years ago
Which of the following STEM discoverers is known as the “Prince of Math?”
Margarita [4]
The German mathematician & physicist ”Carl Friedrich Gauss”

Born: April 30, 1777, Brunswick, Germany
Died: February 23, 1855, Göttingen, Germany
8 0
2 years ago
What is the most basic purpose of the Constitution?
Dimas [21]
I would say to put in a set of the most basic rules of the country that apply to everyone
7 0
3 years ago
Read 2 more answers
To insert the information of the data-label attribute directly before the data cell value, the _____ property is used.
sattari [20]

Answer:

Content is the correct answer to the following blank.

Explanation:

In the following FIB, Content is the property that is used to input the data directly in the data-label attribute earlier than the data cell value. In other words, it is used to insert the data or info of the label of the data attribute straightly without any barrier in the data cell value. So, that's why the following answer is true.

4 0
2 years ago
Other questions:
  • A deleted file or folder is not permanently deleted from a computer until which event occurs? The computer is restarted. The Rec
    13·2 answers
  • Mica's creating his web page with a software that is free of charge for the first month. If he likes the program, he will have t
    8·2 answers
  • What is the answer and why?
    12·1 answer
  • What does the phrase at the drop of a hat mean?
    11·2 answers
  • Select the correct answer.
    6·1 answer
  • Which of the following is a key feature of SmoothWall? Weak traffic graphs and bandwidth bars Universal Plug and Play support DM
    7·1 answer
  • Which type of password would be considered secure
    5·2 answers
  • You scan the network and find a counterfeit access point that is using the same SSID as an already existing access point. What i
    12·1 answer
  • Is it possible build a real time machine?
    7·2 answers
  • This question involves the creation and use of a spinner to generate random numbers in a game. a gamespinner object represents a
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!