answer.
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
Ipatiy [6.2K]
2 years ago
5

Design a GUI program to find the weighted average of four test scores. The four test scores and their respective weights are giv

en in the following format: testscore1 weight1 ... For example, the sample data is as follows: 75 0.20 95 0.35 85 0.15 65 0.30 The user is supposed to enter the data and press a Calculate button. The program must display the weighted average.
Computers and Technology
1 answer:
Alexus [3.1K]2 years ago
3 0

<u>Answer:</u>

I am writing <em>partial code in</em> <em>c++ to calculate weighted average</em>. The weighted average should be calculated based on multiplying the test score and its <em>respective weight and finally add all the test score.</em>

<u>Explanation:</u>

<em>int arrtestscore[100];</em>

<em>int arrweight[100];</em>

<em>int n;</em>

<em>double weightedavg;</em>

<em>cout<<”Enter the number of test score for which weighted average needs to be calculated”;</em>

<em>cin>>n;</em>

<em>for(int x = 0; x <n;x++)</em>

<em>{</em>

<em> cout<<”Enter test score :” + (x+1) ;</em>

<em> cin>>arrtestscore[x];</em>

<em> count<<”Enter the respective weight:”;</em>

<em> cin>>arrweight[x];</em>

<em>}</em>

<em>for (int i=0; i<n;i++)</em>

<em>{</em>

<em> weightedavg = weightedavg + (arrtestscore[i] * arrweight[i])</em>

<em>}</em>

<em>cout<<”weighted average = “ <<weightedavg; </em>

You might be interested in
A router is involved in ____________ layers of the tcp/ip protocol suite.
GenaCL600 [577]
Network Layer of the TCP/IP protocol
3 0
2 years ago
Janice is unsure about her future career path she has grown up on her family farm but she is also interested in medicine Janice
KiRa [710]
Janice can actually used both knowledge as an advantage. She can use her background in farming while learning more about medicine. In such a way, she can have a strong advantage in medicinal farming - like learn ways to create good and effective drugs from plants, etc. 
5 0
2 years ago
1. What is the global marketplace?
VladimirAG [237]

I know the answer for 1 is A

5 0
2 years ago
Read 2 more answers
Which of the following is an object such as a field which can be inserted into a document
ivanzaharov [21]

Answer:

SORRY but U have to make a new question.

Explanation:

bc u put which is the following is ..... u did not put the following

cant help on this one.

8 0
2 years ago
The ____________ protocol enables two users to establish a secret key using a public-key scheme based on discrete logarithms
strojnjashka [21]

The answer in the space provided is the Diffie-Hellman Key Exchange. This is entitled to be the first published key algorithm in which has a limit in which the exchange occurs in secret values and that its purpose was to enable two users to have an exchange of key in a secure manner in means of using it for a subsequent symmetric encryption in terms of messages.

7 0
2 years ago
Other questions:
  • PHP is based on C rather than ______.
    5·1 answer
  • ________ is a free online service that enables a user to contact a cell phone number to hear who answers the telephone without i
    5·1 answer
  • You are the IT security administrator for a small corporate network. Samuel Garcia (sgarcia) has been away on vacation and has f
    9·1 answer
  • A form of artificial intelligence that can perform many complex, _______ tasks. Select one: a. serialized b. repetitive c. non-r
    7·1 answer
  • This program will output a right triangle based on user specified height triangle_height and symbol triangle_char. (1) The given
    9·1 answer
  • Fill in the missing word in this program. class TooWide(Exception): pass answer = input('How wide is it? ') width = float(answer
    7·1 answer
  • In the next five years there are expected to be over _____ unfilled jobs in the US in computer science.
    10·1 answer
  • As a twist on the Hello World exercise, you are going to be the end user of the Hello class. This class is designed to greet the
    9·1 answer
  • Write a program that takes in a positive integer as input, and outputs a string of 1's and 0's representing the integer in binar
    12·1 answer
  • Accenture has partnered with a global construction company that specializes in building skyscrapers. The company wants better ma
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!