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
ollegr [7]
3 years ago
8

Write a program that prompts the user to enter the weight of a person in kilograms and outputs the equivalent weight in pounds.

Output both the weights rounded to two decimal places. (Note that 1 kilogram is 2.2 pounds.)

Computers and Technology
1 answer:
Alex3 years ago
6 0

Answer:

#include<iostream>

#include<string>

int main()

{

double weight;

double weightInPounds;

cout<<"Enter Weight of person in kilograms\n";

cin>>weight;

weightInPounds = weight * 2.2;

cout<<"Your weight in Pounds is : "<<weightInPounds<<endl;

return 0;

}

You might be interested in
What type of malicious procedure involves using sniffing tools to capture network communications to intercept confidential infor
Alex_Xolod [135]

Answer:

eavesdropping

Explanation:

Eavesdropping is as an <em>electronic attack</em> where digital communications are intercepted by an individual whom they are not intended. This is done in two main ways: <em>Directly listening</em> to digital or analog voice communication or the <em>interception or sniffing</em> of data relating to any form of communication.

4 0
3 years ago
Bluetooth is a common wireless protocol used to make pan connections. <br> a. True <br> b. False
Minchanka [31]
 a. True  This  is because it covers only a short distance  and allows  sharing of data between short distances(PAN) 
5 0
3 years ago
Who is the father of modern computer?​
nydimaria [60]

Answer:

I would say Alan Turing is the father of the modern computer

7 0
3 years ago
Read 2 more answers
Write a program that records high-score data for a fictitious game. the program will ask the user to enter five names, and five
Harman [31]

Scores.cpp

#include <iostream>

#include <string>

using namespace std;

void initializeArrays(string names[], int scores[], int size);

void sortData(string names[], int scores[], int size);

void displayData(const string names[], const int scores[], int size);

int main()

{

   string names[5];

   int scores[5];

   //reading names and scores

   initializeArrays(names, scores, 5);

   //sorting the lists based on score.

   sortData(names, scores, 5);

   //displaying the contents of both arrays

   displayData(names, scores, 5);

 

  return 0;

}

void initializeArrays(string names[], int scores[], int size){

   for(int i=0; i<size; i++){

       cout<<"Enter the name for score #"<<(i+1)<<": ";

       cin >> names[i];

       cout<<"Enter the score for score #"<<(i+1)<<": ";

       cin >> scores[i];

       }

}

void sortData(string names[], int scores[], int size){

   

       int temp = 0;

       string tempStr = "";

       

       for(int i=0; i < size; i++){

               for(int j=1; j < (size-i); j++){

                      //checking max score and sorting based on it.

                       if(scores[j-1]< scores[j]){

                               //swap the elements!

                           //swapping scores

                               temp = scores[j-1];

                               scores[j-1] = scores[j];

                               scores[j]=temp;

                               

                               //swapping names

                               tempStr = names[j-1];

                               names[j-1] = names[j];

                               names[j]=tempStr;

                       }

                       

               }

       }

}

void displayData(const string names[], const int scores[], int size){

   cout<<"Top Scorers:"<<endl;

       //printing the elements up to the size of both arrays.

       for(int i=0; i<size; i++){

           cout<<names[i]<<": "<<scores[i]<<endl;

       }

}

3 0
3 years ago
Write code to assign the number of characters in the string rv to a variable num_chars.
kramer

Answer:

rv = "hello"

num_chars = len(rv)

print(num_chars)

Explanation:

*The code is in Python.

Initialize the string rv, in this example I set it to "hello"

Use the len() method to get the number of characters in the rv and set it to the num_chars

Print the num_chars

Note that the result will be 5 in this case, because <em>hello</em> consists of five characters

6 0
3 years ago
Other questions:
  • Which is an example of intrinsic motivation?
    13·2 answers
  • If Denise specifies Jan? as a search criterion, Excel will locate all of the following records EXCEPT ____.
    9·1 answer
  • How to see the range of values of vty lines?
    15·1 answer
  • Consider the following classes: public class Vehicle {...} public class Car extends Vehicle {...} public class SUV extends Car {
    8·1 answer
  • Head-mounted displays often use organic light emitting diode,or technology.
    15·1 answer
  • A computer processes data using only 1s and 0s true or false?
    9·2 answers
  • Edhesive coding practice 3.4​
    13·2 answers
  • In batch operating system three job J1 J2 and J3 are submitted for execution each job involes an I/O activity a CPU time and ano
    13·1 answer
  • How do you do 1.17.5, invert colors, on codehs?
    10·1 answer
  • Write a short note on Ms - Excel...​..
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!