Complete this program to read in each of the four scores as float values, multiply each score by its corresponding weight, and then sum up the weighted scores to get the participant's final score as a float value.

Microsoft Visual C#
7th Edition
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Joyce, Farrell.
Chapter6: Using Arrays
Section: Chapter Questions
Problem 6E
icon
Related questions
Question
This program tabulates scores for a figure skating competition that has four parts:
1. The short dance, which is worth 25% of the final score
2. The free skate, which is worth 50% of the final score
3. The partner dance, which is worth 10% of the final score
4. And the original performance, which is worth 15% of the final score
The array weights stores values that represent how much of the final score each the four parts is worth.
Complete this program to read in each of the four scores as float values, multiply each score by its corresponding weight, and then sum up the weighted scores to get the participant's final score as a float value.
p3.pp O
O New
I Full Screen *
1
#include <iostream>
#include <vector>
using namespace std;
3
4
5 const int WEIGHT_SIZE = 4;
6
int main() {
float weights[WEIGHT_SIZE]
float total
7
{e.25, е.50, е.10, е.15};
e.e;
10
11
// TODO: Write your code here
12
cout
"Final Score: "
total
endl;
13
14
15
Transcribed Image Text:This program tabulates scores for a figure skating competition that has four parts: 1. The short dance, which is worth 25% of the final score 2. The free skate, which is worth 50% of the final score 3. The partner dance, which is worth 10% of the final score 4. And the original performance, which is worth 15% of the final score The array weights stores values that represent how much of the final score each the four parts is worth. Complete this program to read in each of the four scores as float values, multiply each score by its corresponding weight, and then sum up the weighted scores to get the participant's final score as a float value. p3.pp O O New I Full Screen * 1 #include <iostream> #include <vector> using namespace std; 3 4 5 const int WEIGHT_SIZE = 4; 6 int main() { float weights[WEIGHT_SIZE] float total 7 {e.25, е.50, е.10, е.15}; e.e; 10 11 // TODO: Write your code here 12 cout "Final Score: " total endl; 13 14 15
The mode of a dataset is the item that appears most frequently.
Write a program to read in numbers between 1 and 100 and then report the mode. If more than one number appears most frequently, choose the highest number. Output a line with the result in this format:
The most frequent value was 42, appearing 9 times.
p4.cpp 0
O New
I Full Screen
#include <iostream>
using namespace std;
int main() {
// TODO: Write your code here
cout « "The most frequent value was " « 50 <« ", appearing " <« e « " times." <« endl;
{
11
10
Transcribed Image Text:The mode of a dataset is the item that appears most frequently. Write a program to read in numbers between 1 and 100 and then report the mode. If more than one number appears most frequently, choose the highest number. Output a line with the result in this format: The most frequent value was 42, appearing 9 times. p4.cpp 0 O New I Full Screen #include <iostream> using namespace std; int main() { // TODO: Write your code here cout « "The most frequent value was " « 50 <« ", appearing " <« e « " times." <« endl; { 11 10
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Random Class and its operations
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr