Question

Problem 1 In this problem, we want to generate N random values of type integer between 7 and 70 inclusive, and then find their average. Print the average and a sentence the average is low if the average is less than 52, the average is high if it is more than 52, and the average is in the middle if it is 52. Asks how many values to generate (i.e.: N). Generates N values between 7 and 70 inclusive. Find the average. Print the average. Print a sentence based on the average Note: The program should produce different output for each run because the numbers are generated randomly Sample Input/ Output he average is 49.165 and the average is lou ou nany valaesi 1 he average is 62-1786 and the average is high Problem 2: Carefully study the code in main() on the next page before attempting to declare and write the following four functions:

using c++

0 0
Add a comment Improve this question Transcribed image text
Request Professional Answer

Request Answer!

We need at least 10 more requests to produce the answer.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the answer will be notified once they are available.
Know the answer?
Add Answer to:
using c++ Problem 1 In this problem, we want to generate N random values of type...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Similar Homework Help Questions
  • For this assignment, write a program that will generate random numbers in the range of 50-100...

    For this assignment, write a program that will generate random numbers in the range of 50-100 and count how many fall into particular ranges. Processing: The program should first seed the random number generator. This is done one time in the program. Use srand(0). Next, generate and display a series of 10 random numbers between 50 and 100. There are several ways to ensure that a random number falls between 50 and 100. One possibility is to use the following...

  • (c++) Write a program that generates a random number between 1 and 100 and asks the...

    (c++) Write a program that generates a random number between 1 and 100 and asks the user to guess what the number is. If the user’s guess is higher than the random number, the program should display “Too high, try again.” If the user’s guess is lower than the random number, the program should display “Too low, try again.” The program should use a loop that repeats until the user correctly guesses the random number. Be sure that your program...

  • Problem 5. We want to make a Schottky diode on one surface of an n-type semiconductor, and an ohm...

    Problem 5. We want to make a Schottky diode on one surface of an n-type semiconductor, and an ohmic contact on the other side. The electron affinity is 5 eV, bandgap is 1.5 eV, and the Fermi potential (the difference between the Fermi level Ef and the intrinsic level Ei) is 0.25 eV d the values of the work functions of the two metals be? (Give your answer as greater than or less than certain values.) Sketch the band diagram...

  • Can anyone help me write a simple code for this problem in C++? Generate N>10 random...

    Can anyone help me write a simple code for this problem in C++? Generate N>10 random values from 1 to 100 using a uniform probability distribution. N is entered by the user. The first 5 values are put into nodes and added to a priority queue based on their value. Each node also contains a list of values. After the first 5 are inserted into the priority queue the rest of the values are added to the lists with the...

  • (Q2) Calculating the Distribution of Values 10 marks For a set of n real numbers {xi,...,...

    (Q2) Calculating the Distribution of Values 10 marks For a set of n real numbers {xi,..., x.J, here are a number of basic statistics we would like to know about the distribution of these numbers: ·The minimum value m = min(x 1, . .., Xn The maximum value Mmax{xi,..., x,J The average value a -^ 1x The standard deviation sx,-a)2. Write a program stats.c that calculates these values for a sequence of values it reads from stdin. The input is...

  • DESCRIPTION Implement a program in C++ that generates a specified number of random integers, records them...

    DESCRIPTION Implement a program in C++ that generates a specified number of random integers, records them in three arrays, then sorts the arrays with Insertion Sort, Merge Sort, and Quick Sort, respectively. Augment the three sorting algorithms with counters and report the number of characteristic operations each performs in sorting the (same) random values. INPUT The program reads from the terminal the number of random integers to generate, a seed value for the pseudo-random number generator, and a character that...

  • Count Below and Above Average Numbers Use the following main( ) function: const int maxSize =...

    Count Below and Above Average Numbers Use the following main( ) function: const int maxSize = 50; int main() { int l, u, n, A[maxSize], le, mo; input(l, u); cout << "How many numbers you want to generate < 50: "; cin >> n; generateNumbers(n, l, u, A); le = countLessMore(n, A, mo); cout << "There are " << le << " numbers less than the average and "    << mo << " numbers more than the average" <<...

  • Problem Three: (Based on Attaway, Chapter 5, Exercise 20) The inverse of the mathematical constant e can be approximated as follows: a c 7n Write a script that will loop through values of n (star...

    Problem Three: (Based on Attaway, Chapter 5, Exercise 20) The inverse of the mathematical constant e can be approximated as follows: a c 7n Write a script that will loop through values of n (starting at n 2) until the difference between the approximation and the actual value is less than 0.0001 The soript should the print the value of n required for such accuracy. Problem Three: (Based on Attaway, Chapter 5, Exercise 20) The inverse of the mathematical constant...

  • In this problem you'll get to use one of Java's random number generators, java.util.Random (see the...

    In this problem you'll get to use one of Java's random number generators, java.util.Random (see the docs for Random). This class generates a random double precision number uniformly distributed in the range [0.0 ... 1.0). That is, the numbers go from 0 to 1, including 0 but excluding 1. It is a common need in Java programming to generate a random integer number that's uniformly distributed in the range of [0 ... n), such as we saw in the dice...

  • Write a C++ program named, gradeProcessor.cpp, that will do the following tasks: -Print welcome message -Generate...

    Write a C++ program named, gradeProcessor.cpp, that will do the following tasks: -Print welcome message -Generate the number of test scores the user enters; have scores fall into a normal distribution for grades -Display all of the generated scores - no more than 10 per line -Calculate and display the average of all scores -Find and display the number of scores above the overall average (previous output) -Find and display the letter grade that corresponds to the average above (overall...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT