Menu

[solved]-Code 78 Random Number Generator 1 Include 2 Include 3 Include 4 Include 5 Using Namespace Q39068624

Code 7.8: Random number generator 1 #include <iostream> 2 #include <cmath> 3 #include <cstdlib> 4 #include <ctime> 5 using naITIONIS Modify the program to generate numbers in the range (5,10). Modify the program to generate numbers in the range [-3,2Code 7.8: Random number generator 1 #include <iostream> 2 #include <cmath> 3 #include <cstdlib> 4 #include <ctime> 5 using namespace std; int main() { int n, r; srand(time(NULL)); cout << “How many numbers do you want? “; cin >> n; for (int i = 1; i <= n; i++) { r = rand() % 9 + 1; cout << r << “” return 0; What is the range of numbers generated by the program? ITIONIS Modify the program to generate numbers in the range (5,10). Modify the program to generate numbers in the range [-3,25). Modify the program to allow the user to specify the range of values to be generated Modify the program to display a frequency distribution of the values and graph results. Sample output: How many number do you want? 20 2 263 2 3 4 1 4 3 4 5 5 4 3 3 3 3 4 2 Value Freq Graph Show transcribed image text Code 7.8: Random number generator 1 #include 2 #include 3 #include 4 #include 5 using namespace std; int main() { int n, r; srand(time(NULL)); cout n; for (int i = 1; i

Expert Answer


Answer to Code 7.8: Random number generator 1 #include 2 #include 3 #include 4 #include 5 using namespace std; int main() { int n,… . . .

OR


Leave a Reply

Your email address will not be published. Required fields are marked *