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
HELP ASAP!!!
stiks02 [169]
Comparison would be most suitable. I hope I could be a help


7 0
4 years ago
Read 2 more answers
Martha and her project group want to present the class their work in the form of a slideshow that includes charts. Which applica
Gennadij [26K]

Answer:

Your answer is D.  multimedia software

Explanation:

6 0
3 years ago
Create a new Java project/class called Examine1. Prompt user as to how many numbers they would like to enter. Use a cumulative s
Zinaida [17]

Answer:

Explanation:

The following code is written in Java and like requested prompts the user for a number to continue or a letter to exit. Then loops and keeps adding all of the numbers to the sum variable and adding 1 to the count for each number entered. Finally, it prints the sum and the average using printf and the variables.

import java.util.Scanner;

class Examine1 {

   public static void main(String[] args) {

       Scanner in = new Scanner(System.in);

       int sum = 0;

       int count = 0;

       System.out.println("Enter a number to continue or a letter to exit.");

       while(in.hasNextInt()) {

           System.out.println("Enter a number:");

           sum += in.nextInt();

           count += 1;

       }

       System.out.printf("The sum is %s.%n", sum);

       System.out.printf("The average is %s.", (sum / count));

   }

}

8 0
3 years ago
how to Create a flowchart that will perform the multiplication, addition, subtraction and division of two numbers. First, the tw
tekilochka [14]
Start
↓
Ask for two numbers from user
↓
Store the numbers as A and B
↓
Perform
A + B = C
A - B = D
A x B = E
A / B = F
↓
Display as text
A + B = C
A - B = D
A x B = E
A / B = F
↓
End
7 0
4 years ago
What is the protocol? What does it do? What layer of the OSI Model does it support?
melomori [17]

Answer:

Protocol: It is a set of rules that govern communication over electronic devices. It is bridge between two devices to communicate with each other. All layers of  OSI model support some protocol features of communication between devices over internet.

Explanation:

What is the Protocol

A protocol is a set of rules that govern communication over electronic devices that how to communicate with each other. These sets of rules include how to send data, what type of data may be transmitted, and how to receive the data and how to confirm that, data has been transmitted successfully.

You can think about protocol as a spoken language between two people. Therefore, people can understand their language easily if both know its rules and vocabulary. That means, if both people can speak with each other in the same language then they can communicate effectively with each other.

Similarly, if two devices support the same protocol, regardless of the type of device or manufacturers, they can communicate with each other effectively. For example, an android device can send email to an iPhone device using a standard mail protocol.

Today different Protocols exist for several different applications. For example wired networking (e.g. Ethernet), wireless networking (e.g. 802.11ac) and internet communication (e.g. IP).

The Internet protocol contains dozens of protocol which is used for transmitting data over the Internet. The protocol may be broken into four categories.

1. Link layer

2. Internet layer

3. Transport layer

4. Application layer

<u>OSI Model and Its Layers</u>

The Open System Interconnection (OSI) model is a conceptual model that is created by the International Organization for Standardization (ISO) which uses a standard protocol to enable communication between devices. In short, the OSI model provides a standard of communication between different computer systems. It has 7 layers, each layer has its own functionality as described below:

  1. Physical layer: Transmits raw bitstream over the physical medium
  2. Data link layer: Define the format of data on the network
  3. Network layer: Decide which physical path the data will take
  4. Transport layer: Transmit data using transmission protocols including UDP and TCP
  5. Session layer: Maintains connections and is responsible for controlling sessions and ports
  6. Presentation layer: Ensure that data is in a usable format and is where data encryption occur
  7. Application layer: Human-computer-interaction layer, where the application can access the network services

<u></u>

3 0
3 years ago
Other questions:
  • 5) How have the wireless web and peer-to-peer networking helped small businesses compete with large corporations?
    15·2 answers
  • General Hardware Products Your boss, the IT director, wants you to explain FDDs, BPM, DFDs, and UML to a group of company manage
    13·1 answer
  • Universal Containers (UC) is currently live with Sales Cloud and in the process of implementing Service Cloud. UC wants to creat
    5·1 answer
  • This program outputs a downwards facing arrow composed of a rectangle and a right triangle. The arrow dimensions are defined by
    8·1 answer
  • Point out the wrong statement:
    7·1 answer
  • What is the output of the following code<br> X = 06<br> y = 0<br> print (x ** y)
    12·1 answer
  • Pls help me pls I’m struggling
    7·1 answer
  • Walter has an associate's degree in computer science and aspires to become a web developer. Which certification will help enhanc
    14·1 answer
  • How much would you guys pay for a used ps4 with a black ops 3 disc?
    5·1 answer
  • Write a program that accepts the lengths of three sides of a triangle as inputs. the program output should indicate whether or n
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!