subject
Computers and Technology, 01.07.2020 15:01 mdarter

LAB: Warm up:
People's weights Output each floating-point value with two digits after the decimal point, which can be achieved as follows:
printf("%0.2lf", yourValue);
(1) Prompt the user to enter five numbers, being five people's weights. Store the numbers in an array of doubles. Output the array's numbers on one line, each number followed by one space. (2 pts)
Ex:
Enter weight 1: 236.0
Enter weight 2: 89.5
Enter weight 3: 142.0
Enter weight 4: 166.3
Enter weight 5: 93.0
You entered: 236.00 89.50 142.00 166.30 93.00
(2) Also output the total weight, by summing the array's elements. (1 pt)
(3) Also output the average of the array's elements. (1 pt)
(4) Also output the max array element. (2 pts)
Ex:
Enter weight 1: 236.0
Enter weight 2: 89.5
Enter weight 3: 142.0
Enter weight 4: 166.3
Enter weight 5: 93.0
You entered: 236.00

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 23:30
Acomputer is a multipurpose device that accepts input, processes data, stores data, and produces output, all according to a series of stored . the processing unit of most modern computers is a(n) . the instructions that tell a computer how to carry out a task are referred to as computer , which are distributed as software. computers run three main types of software: software, system software, and development tools. an example of system software is a computer system, which is essentially the master controller for all the activities that a digital device performs. digital devices are constructed using tiny electronic components that represent data bits as electrical signals. the system unit houses the system board, which contains several circuits made from semiconducting materials. computers come in three popular form factors: component, , and slate. many of today's digital devices operate on battery power supplied by ion batteries. battery life and lifespan can be extended by following good battery management practices.
Answers: 3
question
Computers and Technology, 22.06.2019 15:00
Which of the following has not been attributed at least in part to social media a. drug addiction b. depression c. kidnapping d. murder
Answers: 2
question
Computers and Technology, 22.06.2019 17:40
Write a modular program (no classes yet, just from what you learned last year), that allows two players to play a game of tic-tac-toe. use a two-dimensional char array with 3 rows and 3 columns as the game board. each element of the array should be initialized with an asterisk (*). the program should display the initial board configuration and then start a loop that does the following: allow player 1 to select a location on the board for an x by entering a row and column number. then redisplay the board with an x replacing the * in the chosen location. if there is no winner yet and the board is not yet full, allow player 2 to select a location on the board for an o by entering a row and column number. then redisplay the board with an o replacing the * in the chosen location. the loop should continue until a player has won or a tie has occurred, then display a message indicating who won, or reporting that a tie occurred. player 1 wins when there are three xs in a row, a column, or a diagonal on the game board. player 2 wins when there are three ox in a row, a column, or a diagonal on the game board. a tie occurs when all of the locations on the board are full, but there is no winner. input validation: only allow legal moves to be entered. the row must be 1, 2, or 3. the column must be 1, 2 3. the (row, column) position entered must currently be empty (i.e., still have an asterisk in it).
Answers: 1
question
Computers and Technology, 22.06.2019 23:30
In my email i got a message it says a quick message and in message details on who its from its says nicole and under nicole is [email protected] -
Answers: 1
You know the right answer?
LAB: Warm up:
People's weights Output each floating-point value with two digits after the de...
Questions
question
English, 02.11.2021 03:30
question
Health, 02.11.2021 03:30
question
English, 02.11.2021 03:30
Questions on the website: 13722360