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]
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
Jody should select the
Alex Ar [27]

Answer:

In the View tab, you will find Zoom Option. Set the Zoom level to 100%.

Explanation:

You need to set the Zoom level to 100%, And you can do this, by setting the zoom level to 100%, from the scroll bar. Or you can move to view tab in the main menu, and then in the Ribbon, you need to select the zoom % and set it to 100 percent. You will then be able to see the entire page. And if you want, you can increase the Zoom level to even further, for getting an even more clearer picture.

3 0
3 years ago
Array Challenge Have the function ArrayChallenge (arr) take the array of numbers stored in arr and return the string true if any
vampirchik [111]

Answer:

The code is given as follows,

Explanation:

Code:

#include <stdio.h>

#include <string.h>  

int n; //to store size of array  

char* ArrayChallenge(int arr[]) //function returns string true or false

{

  int i, j;

  int sum = 0;

  for(i = 0; i < n; i++)

  {

      sum = sum + arr[i]; //count sum

  }  

  for(i = 0; i < n; i++)

  {

      for(j = i+1; j < n; j++) //loop for every two elements in array

      {

          if(arr[i]*arr[j] > 2*sum) //check if proudct of two elements > 2 times sum

          {

              printf("\n%d x %d = %d, 2xSum = %d\n", arr[i], arr[j], arr[i]*arr[j], 2*sum);

              return "true"; //If proudct of two elements > 2 times sum. return true

          }

      }

  }

  return "false"; // If proudct of two elements < 2 times sum. return false

}  

int main()

{  

  printf("\nEnter size of array: ");

  scanf("%d", &n); //read size of array

  int A[n]; //array of size n

  printf("\nEnter array elements: ");

  int i;

  for(i = 0; i < n; i++)

  {

      scanf("%d", &A[i]); //read array from stdin

  }

  printf("%s\n",ArrayChallenge(A)); //ccall function and print answer

 

  return 0;

}

6 0
3 years ago
An apple, potato, and onion all taste the same if you eat them with your nose plugged
lys-0071 [83]

Answer:Have a good dayyyyy

Explanation:    can i be brainliest pls pls

4 0
2 years ago
Read 2 more answers
In which order does the processor search computer memory when it requires instruction or data?
skelet666 [1.2K]

Answer:

I think the answer is

Ram- Cache Memory-Hard disk

Explanation:

I hope this helps you

4 0
2 years ago
Plz answer in order so like the the nitrogen bacteria is-
Nastasia [14]

Answer:

Nitrogen-fixing bacteria, microorganisms capable of transforming atmospheric nitrogen into fixed nitrogen.

Explanation: I hope this helps! (。^▽^)

6 0
2 years ago
Read 2 more answers
Other questions:
  • Jameis is researching at his local library when he finds a perfect source to use in his paper. When he goes to check the book ou
    12·2 answers
  • A Web ____ is a software program that retrieves the page and displays it. Select one:
    5·1 answer
  • Which is a benefit of peer-to-peer networking?
    10·1 answer
  • This is an electronic method used to send and receive data–voice, text, images, and video.
    13·2 answers
  • Which type of address defines a single network interface in a computer or other device?
    7·1 answer
  • Assume you have taken another square picture with the 25-megapixel digital camera discussed in the previous question. This time
    8·1 answer
  • What is software that, while purporting to serve some useful function and often fulfilling that function, also allows Internet a
    11·1 answer
  • Universal Containers (UC) has multi-level account hierarchies that represent departments within their major Accounts. Users are
    13·1 answer
  • Which camera required the photographer to project the image on paper
    9·2 answers
  • Consider the following implementation of a search method:
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!