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
You run an automobile selling company that has a popular online store on AWS. The application sits behind an Auto Scaling group
vredina [299]

Answer:

We can achieve this by using cURL command and GET command.

Explanation:

<u>cURL command: </u>

  • cURL command is the command of the command line tools which are available on the following platforms such as Linux, Windows, Mac OS, and many other Operating Systems.
  • From the servers, cURL transfer the following data by using any of the protocol which are supported such as SFTP, HTTPS, HTTP, FTPS or many of the other protocols.

<u> </u>

<u>GET command: </u>

GET command is the function by which from the particular URL we can retrieve the resources.

8 0
3 years ago
Nicotine us a dangerous chemical found in Cigarettes; it is accompanied by two other very harmful chemicals. These are
NNADVOKAT [17]

Answer: Carbon Monoxide and Tar.

4 0
3 years ago
Decimal numbers are based on __________.
Shtirlitz [24]
Decimals are based on the preceding powers of 10. Thus, as we move from left to right, the place value of digits gets divided by 10, meaning the decimal place value determines the tenths, hundredths and thousandths. A tenth means one tenth or 1/10. In decimal form, it is 0.1.
6 0
3 years ago
Do you think that the TV set has outlived its utility as a household appliance? Research how convergence with internet technolog
kherson [118]

Answer:

What is Computer? & technology

7 0
2 years ago
Which IDEs support multiple high-level programming languages? Select all that apply.
nata0808 [166]

Answer:

eclipse, xcode, and visual studio

6 0
3 years ago
Read 2 more answers
Other questions:
  • Test if a password entered is correct. The secret phrase is Ada Lovelace. Sample Run 1 Enter the Password: Ada Lovelace Sample O
    13·1 answer
  • Explain how to use fortran programming in details
    14·1 answer
  • All of the following except one are issues that should be covered in an AUP. Which one is the exception?
    5·1 answer
  • When should an individual consider entering parenthood?
    5·1 answer
  • A Silicon Valley billionaire purchases 3 new cars for his collection at the end of every month. Let a_n denote the number of car
    8·1 answer
  • The marketplace is the essence of which of the following?
    11·1 answer
  • Write a program to find the sum of first 10 even numbers in qbasic​
    15·1 answer
  • Tgif
    7·1 answer
  • Write a method that accepts an integer argument and returns the sum of all the integers from 1 up to (and including) the number
    14·1 answer
  • What is a for command? can u use a variable instead of a number in the for command!<br>​
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!