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
Ipatiy [6.2K]
3 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]3 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
Instructions:Select the correct answer.
Gnesinka [82]
C) team leader is the answer
4 0
3 years ago
Every brand of computer has its own binary language, called
Kaylis [27]
Machine language.

Hope this helps
6 0
3 years ago
What are the three fundamental principals of mnemonics??
olasank [31]
The three fundamental principles underlying the use of mnemonics are imagination, association and location
4 0
3 years ago
Read 2 more answers
What refrigerant has been approved for new household refrigerators and freezers
Alexxx [7]
Bsbsnsnsnsn jajwjemoeododhdhdw whajsjshtzzvsssnxbba. 3
8 0
3 years ago
Big Data, Apple Pie, and the Future In this unit, you were introduced to various kinds of software, particularly databases. Data
Andreas93 [3]

Answer:

I want to answer the 1st question. It asks, “Will we treat people unfairly for crimes they haven’t committed?” Well, of course, that’s a 100% chance. But, some people forget that people treat people unfairly for crimes they haven’t committed. Some people stay in jail for up to 35 years and are then released because they are innocent. Yes, computers will make mistakes, but the probability is much, much smaller than a human.

Explanation:

3 0
2 years ago
Other questions:
  • Here are the codes for producer and consumer problems.
    10·1 answer
  • Ann is in the middle of completing her first 1040EZ tax form. She has some questions about an instruction on the form. What shou
    8·2 answers
  • The title bar of a window tells you the name of the document or program that's being displayed in the window, and it also serves
    11·1 answer
  • Which wireless communication technology is most likely used when synchronizing device information to an automobile?
    9·1 answer
  • A smart phone is always a _____.<br> client<br> server<br> network<br> process
    10·1 answer
  • Which type of microphone uses two metal plates?
    7·1 answer
  • Discuss five processes for analyzing a qualitative study
    11·2 answers
  • What is the relationship between agile teams and project requirements
    9·1 answer
  • Priortization is an example of a skill that helps you reach long term goals because
    14·1 answer
  • GIVING BRAINLIEST
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!