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
The company database may be stored on a central database server and managed by a database adminstrator true or false
RUDIKE [14]
The answer is True.  <span>The company database may be stored on a central database server and managed by a database administrator.  </span>
6 0
3 years ago
A computer which links several pcs together in a network is called
Nadusha1986 [10]
Is it called a, "server".
8 0
4 years ago
You were just hired as an IT Specialist for Smalltown School District. Your first assignment is to review a problem area&amp; in
umka21 [38]

Answer:

Explanation:

There are various questions that you can ask in this scenario, such as

What grading policies are being implemented?

How many student grades are being calculated by the program?

What is the requirements for a student to pass?

All of these questions would allow you to get an idea of how extensive the code may be and its complexity. Once you know this you would look at the code revolving around actually looping through the data and doing the necessary calculations. You can then determine how to manipulate the code and make it much more efficient.

You would also need to know how the student data is being saved, which will help determine if it is the best data structure for saving this type of data or if it can be replaced in order to maintain the data secure while increasing the speed of the program. Mainly since this information needs to be continuously used from the data structure.

3 0
3 years ago
According to chronology, arrange the steps that you need to take during the installation of a ram stick?
MAXImum [283]

Answer:

first off you need to take of the screws make sure its unpluged and you open up to see the mother bored

Explanation:

6 0
3 years ago
A method signature for a method consists of all elements of the method except the body. That is, a method signature consists of
Bess [88]
To be honest I feel like it’s B that’s looks and seems the most correct to me
8 0
3 years ago
Other questions:
  • Write a function called printEvens that prints all the even numbers between 2 and 20, inclusive. It will take no arguments and r
    6·1 answer
  • What data discovery process, whereby objects are categorized into predetermined groups, is used in text mining?
    12·1 answer
  • 1.Customer service is assistance provided by a company to the people who buy or use its products or services.
    13·2 answers
  • Someone asks you for help with a computer that hangs at odd times. You turn it on and work for about 15 minutes, and then the co
    7·1 answer
  • Write a Unix (Linux) find-like command (myFind) in Python3 where the function will return the full paths of all the files contai
    9·1 answer
  • According to the government, employees have a right to understand the risks associated with the materials they work with.
    15·1 answer
  • Rafi is developing an application to send urgent information about global health crises over the Internet to hospitals. He is wo
    6·1 answer
  • In two to three sentences, define "home row" and explain why it is important.
    6·2 answers
  • Calculate the heat energy required to raise the temperature of 5 kg of water from 20℃ to
    5·1 answer
  • he attributes for an iframe are controlled by CSS. One of the iframe controls is "seamless." This means it _____. will blend the
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!