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
Where in the Formula tab on the ribbon would you find the Use in Formula function?
Leviafan [203]

Answer:

In Function library you would find the use in Formula function

5 0
3 years ago
Read 2 more answers
Which of these can expose a computer to a virus? Check all that apply.
Rina8888 [55]

Answer:

downloads, websites, emails?

4 0
2 years ago
Read 2 more answers
Help a fellow coder and anser these 5 questions
BlackZzzverrR [31]

Answer: yes because it helps

Explanation: it shows everything

4 0
3 years ago
Is a three-prong grounding plug with the third pong broken-off safe to use.
ad-work [718]
What is the answer choices dude
8 0
3 years ago
The bank has a website that’s been attacked. The attacker utilized the login screen, and rather than entering proper login crede
RoseWind [281]

Answer:

C.SQL Injection

Explanation:

C.The text shown is the classic example of a basic SQL injection to log into a site

7 0
3 years ago
Other questions:
  • Which one of the following features can control left and right indents on using markers
    8·1 answer
  • What is a stereo type?
    14·2 answers
  • Please help will mark brainiest
    8·1 answer
  • Some files appear dimmed in one of the default folders on your computer. What would be the best course of action? A. Leave the f
    5·1 answer
  • You decide to configure ntp on the router to get time ntp server with an ip address of 172.17.8.254 which commanda should you us
    14·1 answer
  • Self contained sequences of actions to be performed are?
    6·1 answer
  • Mkdir() is the command in Java to create a new directory.<br> a) True b) False
    10·1 answer
  • Question 1
    11·1 answer
  • Explain the integer and float datatypes with example.<br><br>​
    11·1 answer
  • A financially stable person is able to:
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!