Method to generate the random numbers

Assignment Help C/C++ Programming
Reference no: EM13699383

Can you write the code that will generate random integers?

Program: Write a program that will generate a set of 75 random integers in the range -26 to + 42. The program should display the following:

a) The number of positive and negative numbers (treat 0 as positive).

b) The average value of the positive numbers

c) The average value of the negative numbers

d) The largest and smallest number.

e) The average of all the numbers.

You have to use a for loop structure for this question along with the Math.random() method to generate the random numbers.

Hint: Produce numbers in the range of 0-68 and subtract 26.

Add comments in code section that will be useful in the future.

Reference no: EM13699383

Questions Cloud

What is the reaction of a ketoester with sodium borohydride : Problem- What is the reaction of a ketoester ( a compound that contains both a keton functional group and an ester functional group) with sodium borohydride
What addressing mode is most appropriate : Suppose n will be the result of an addition instruction and, thus, is not known statically. What addressing mode is most appropriate to use to access the data located in memory at an address that is n bytes larger than the contents of register X?
It can be produced by the reaction of butanoic acid : Problem- Ethyl butyrate, CH3CH2CH2CO2CH2CH3, is an artificial fruit flavor commonly used in the food industry for such flavors as orange and pineapple. Its fragrance and taste are often associated with fresh orange juice, and thus it is most commo..
What is a telecommunications network protocol : What is telecommunications network architecture? Select a network protocol and provide details on the steps that preceded the formal adoption of the protocol by the industry.
Method to generate the random numbers : Write a program that will generate a set of 75 random integers in the range -26 to + 42. The program should display the following:
Calculate the final temperature of a mixture of ice : Problem- Calculate the final temperature of a mixture of 150.0 g of ice initially at -14.0C and 371.5 g of water initially at 91.5C
How many carbon atoms butane : Problem- The fuel used in many disposable lighters is liquid butane, C4H10. How many carbon atoms are in 4.00g of butane
Submit the given circuit drawn in multisim : Ensure to use only MULTI SIM and please attach ALL screen shots for the steps thanks!!
Explain an artificial fruit flavor commonly used in the food : Problem- Ethyl butyrate, CH3CH2CH2CO2CH2CH3, is an artificial fruit flavor commonly used in the food industry for such flavors as orange and pineapple. Its fragrance and taste are often associated with fresh orange juice, and thus it is most commo..

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd