Resistor Precision

Resistor Precision
Resistor Precision
What C++ program can be used for this?

A voltage source supplies a load through a resistor. The
voltage source has a rating of 1000 volts and a power rating
of 10000 watts. The resistor is 5 ohms with a power ratings
of 118.975 watts. The resistance of the load may vary
randomly between 200 and 600 ohms. Using 100000 samples
calculate the number of times the power rating of the resistor is exceeded, average power delivered by source, maximum power delivered by source, and the minimum power delivered by source.

The output of the program should consist of 4 numbers,
each number being output on a separate line in the order
listed above. The numbers should be output with a precision
of 2.

Someone previous answered but their answer was too vague. If someone could like break it down for me that would be great
I don't have any code cause i really dont know how to do it thats why i trying to get someone to explain it to me

I assume that, given a value of R, you can complete the calculations. The trick, then, is to generate one hundred thousand random values evenly distributed in [200, 600]. The line of C++ to generate each such value is

r = rand()%401 + 200;

Put that in your loop, test each value, and update your statistics accordingly.

3296 Variable Resistor Precision 10 pcs 3296 Variable Resistor Precision 10 pcs Paypal 0 Bid US $.99 4h 20m
Resistance wire 0004 mm for winding precision resistor Resistance wire 0004 mm for winding precision resistor Paypal 0 Bid US $2.00 5h 18m
NEW 50PCS 3296 Variable Resistors Pack High Precision NEW 50PCS 3296 Variable Resistors Pack High Precision Paypal US $11.00 5h 37m
3296 Variable Resistor Precision 50 pcs 3296 Variable Resistor Precision 50 pcs Paypal US $8.99 5h 44m
3362P Variable Resistor Precision 50 pcs 3362P Variable Resistor Precision 50 pcs Paypal 0 Bid US $6.99 7h 26m
10 VISHAY DALE LVR 5 01OHM 5W 1 PRECISION RESISTOR 10 VISHAY DALE LVR 5 01OHM 5W 1 PRECISION RESISTOR Paypal US $4.99 10h 32m
40pcs 4 values High Precision 3296 Variable Resistors 40pcs 4 values High Precision 3296 Variable Resistors Paypal US $9.99 13h 30m
20 pcs 01 PRECISION POWER RCD RESISTORS 250ohm 3W 20 pcs 01 PRECISION POWER RCD RESISTORS 250ohm 3W Paypal US $3.95 14h 32m
20kW 35W THICK FILM Precision Power resistors 20pcs NEW 20kW 35W THICK FILM Precision Power resistors 20pcs NEW Paypal 0 Bid US $5.00 16h 33m
1000pcs 3296 505 5000K 5M Variable Resistor Precision 1000pcs 3296 505 5000K 5M Variable Resistor Precision Paypal US $178.00 18h
1000pcs 3296 502 5K Variable Resistor Precision 1000pcs 3296 502 5K Variable Resistor Precision Paypal US $178.00 18h
10pcs 3296 501 500ohm Variable Resistor Precision 10pcs 3296 501 500ohm Variable Resistor Precision Paypal US $7.99 18h
50pcs 3296 503 50K Variable Resistor Precision 50pcs 3296 503 50K Variable Resistor Precision Paypal US $13.99 18h
1000pcs 3296 501 500ohm Variable Resistor Precision 1000pcs 3296 501 500ohm Variable Resistor Precision Paypal US $178.00 18h
10pcs 3296 504 500K Variable Resistor Precision 10pcs 3296 504 500K Variable Resistor Precision Paypal US $7.99 18h
10pcs 3296 505 5000K 5M Variable Resistor Precision 10pcs 3296 505 5000K 5M Variable Resistor Precision Paypal US $7.99 18h 4m
1000pcs 3296 504 500K Variable Resistor Precision 1000pcs 3296 504 500K Variable Resistor Precision Paypal US $178.00 18h 6m
50pcs 3296 502 5K Variable Resistor Precision 50pcs 3296 502 5K Variable Resistor Precision Paypal US $13.99 18h 6m
1000pcs 3296 503 50K Variable Resistor Precision 1000pcs 3296 503 50K Variable Resistor Precision Paypal US $178.00 18h 11m
50pcs 3296 501 500ohm Variable Resistor Precision 50pcs 3296 501 500ohm Variable Resistor Precision Paypal US $13.99 18h 11m
10pcs 3296 502 5K Variable Resistor Precision 10pcs 3296 502 5K Variable Resistor Precision Paypal US $7.99 18h 11m
50pcs 3296 504 500K Variable Resistor Precision 50pcs 3296 504 500K Variable Resistor Precision Paypal US $13.99 18h 11m
10pcs 3296 503 50K Variable Resistor Precision 10pcs 3296 503 50K Variable Resistor Precision Paypal US $7.99 18h 11m
50pcs 3296 505 5000K 5M Variable Resistor Precision 50pcs 3296 505 5000K 5M Variable Resistor Precision Paypal US $13.99 18h 11m
Metal Film Precision Resistors 15M 1 1 4W new Qty200 Metal Film Precision Resistors 15M 1 1 4W new Qty200 Paypal 0 Bid US $2.00 18h 41m
20 pcs High Precision 3296 Variable Resistors 50K OHM 20 pcs High Precision 3296 Variable Resistors 50K OHM Paypal US $6.99 19h 9m
10 pcs High Precision 3296 Variable Resistors 50K OHM 10 pcs High Precision 3296 Variable Resistors 50K OHM Paypal US $4.99 19h 29m
40 pcs High Precision 3296 Variable Resistors 50K OHM 40 pcs High Precision 3296 Variable Resistors 50K OHM Paypal US $9.99 19h 37m
100 pcs High Precision 3296 Variable Resistors 50K OHM 100 pcs High Precision 3296 Variable Resistors 50K OHM Paypal US $19.99 19h 47m
3362P Variable Resistor Precision 10 pcs 3362P Variable Resistor Precision 10 pcs Paypal 0 Bid US $.99 20h 18m
100 pcs High Precision 3296 Variable Resistors 20K OHM 100 pcs High Precision 3296 Variable Resistors 20K OHM Paypal US $19.99 20h 23m
40 pcs High Precision 3296 Variable Resistors 20K OHM 40 pcs High Precision 3296 Variable Resistors 20K OHM Paypal US $9.99 20h 33m
20 pcs High Precision 3296 Variable Resistors 20K OHM 20 pcs High Precision 3296 Variable Resistors 20K OHM Paypal US $6.99 21h 18m
10 pcs High Precision 3296 Variable Resistors 20K OHM 10 pcs High Precision 3296 Variable Resistors 20K OHM Paypal US $4.99 22h 25m
Vintage High Precision Resistor Metal Film 301k Ohm 1 Vintage High Precision Resistor Metal Film 301k Ohm 1 Paypal 0 Bid US $9.99 1d 7h 52m
10 Vintage Precision Resistor Metal Film 215k Ohm 1 10 Vintage Precision Resistor Metal Film 215k Ohm 1 Paypal 0 Bid US $5.99 1d 7h 52m
9087 Ohm m PRECISION RESISTOR WIRE MANGANIN NET 300g 9087 Ohm m PRECISION RESISTOR WIRE MANGANIN NET 300g Paypal US $59.99 1d 12h 23m
20 pcs Metal Film Resistors 348Kohm 1W 01 175°C 20 pcs Metal Film Resistors 348Kohm 1W 01 175°C Paypal US $1.95 1d 16h 19m
Bulk Lot Of Resistors Precision Film Cabon Comp 4 Lbs Bulk Lot Of Resistors Precision Film Cabon Comp 4 Lbs Paypal 2 Bids US $5.95 1d 16h 20m
Mepco Electra 00509 Precision Resistors Vintage 10 Pack Mepco Electra 00509 Precision Resistors Vintage 10 Pack Paypal US $38.61 1d 18h 7m
3296 Variable Resistor Pack High Precision 50 pcs 3296 Variable Resistor Pack High Precision 50 pcs Paypal US $12.49 1d 21h 31m
Precision Variable Decade Resistor Resistance Box ZX21 Precision Variable Decade Resistor Resistance Box ZX21 Paypal US $90.00 1d 23h 6m
10K ohm Precision 3296 Variable ResistorVRTrimmerx10 10K ohm Precision 3296 Variable ResistorVRTrimmerx10 Paypal US $4.99 1d 23h 54m
NEW PRECISION VARIABLE DECADE RESISTOR RESISTANCE BOX NEW PRECISION VARIABLE DECADE RESISTOR RESISTANCE BOX Paypal US $75.00 2d 7h 13m
Assorted PRECISION Resistors Metal Film MOhms Assorted PRECISION Resistors Metal Film MOhms Paypal US $8.95 2d 7h 49m
3W 04 ohm 1 Wirewound Precision Power Resistor LUR 3 3W 04 ohm 1 Wirewound Precision Power Resistor LUR 3 Paypal US $9.99 2d 8h 26m
P BASS PRECISION BASS 53 55 VINTAGE capacitor resistor P BASS PRECISION BASS 53 55 VINTAGE capacitor resistor Paypal US $14.00 2d 9h 5m
OVER 20KPCS FILM RESISTORS SOME PRECISION SEE LIST OVER 20KPCS FILM RESISTORS SOME PRECISION SEE LIST Paypal 1 Bid US $9.95 2d 14h 31m
Sealed 2 X 4000 ohm Precision Instrument Resistor 1 Sealed 2 X 4000 ohm Precision Instrument Resistor 1 Paypal US $3.95 2d 15h 7m
80Pc 3096 High Precision Variable Resistor Kit 50 100K 80Pc 3096 High Precision Variable Resistor Kit 50 100K Paypal US $10.00 2d 16h 9m
W W 350000 ohm Precision Instrument Resistor 1 W W 350000 ohm Precision Instrument Resistor 1 Paypal US $3.95 3d 17m
W W 100000 ohm Precision Instrument Resistor 1 W W 100000 ohm Precision Instrument Resistor 1 Paypal US $3.95 3d 33m
W W 231700 ohm Precision Instrument Resistor 1 2 W W 231700 ohm Precision Instrument Resistor 1 2 Paypal US $3.95 3d 43m
W W 490000 ohm Precision Instrument Resistor 1 2 W W 490000 ohm Precision Instrument Resistor 1 2 Paypal US $3.95 3d 51m
W W 485200 ohm Precision Instrument Resistor 1 2 W W 485200 ohm Precision Instrument Resistor 1 2 Paypal US $3.95 3d 1h
W W 100 ohm Precision Instrument Resistor 1 W W 100 ohm Precision Instrument Resistor 1 Paypal US $3.95 3d 1h 7m
3461 Ohm m PRECISION RESISTOR WIRE MANGANIN NET 221g 3461 Ohm m PRECISION RESISTOR WIRE MANGANIN NET 221g Paypal 0 Bid US $29.99 3d 1h 21m
W W 56000 ohm Precision Instrument Resistor W W 56000 ohm Precision Instrument Resistor Paypal US $3.95 3d 1h 44m
MEPCO W W 416000 ohm Precision Instrument Resistor MEPCO W W 416000 ohm Precision Instrument Resistor Paypal US $3.95 3d 1h 52m
1000K 01 Calibrator Precision Resistor 1000K 01 Calibrator Precision Resistor Paypal US $6.95 3d 7h 21m
NEW Precision Shunt Resistors 1 082 ohm SMD Qty 100 NEW Precision Shunt Resistors 1 082 ohm SMD Qty 100 Paypal US $39.95 3d 10h 16m
Qty 20 NEW Precision Shunt Resistors 1 082 ohm SMD Qty 20 NEW Precision Shunt Resistors 1 082 ohm SMD Paypal US $9.95 3d 10h 22m
NEW VISHAY PRECISION RESISTOR STRAIN GAGE S 87150 01 NEW VISHAY PRECISION RESISTOR STRAIN GAGE S 87150 01 Paypal US $9.99 4d 6h 9m
Precision Variable decade resistor resistance Box ZX21 Precision Variable decade resistor resistance Box ZX21 Paypal US $98.90 5d 4h 29m
Huge S5 40V Precision wirewound resistor 33Ohm 250W ±5 Huge S5 40V Precision wirewound resistor 33Ohm 250W ±5 Paypal US $14.00 5d 7h 26m
Otto Wolff Berlin 13839 59 Precision Resistor Otto Wolff Berlin 13839 59 Precision Resistor Paypal 0 Bid US $65.00 5d 8h 13m
Otto Wolff Berlin 13603 58 Precision Resistor Otto Wolff Berlin 13603 58 Precision Resistor Paypal 0 Bid US $65.00 5d 8h 13m
Otto Wolff Berlin 13854 59 Precision Resistor Otto Wolff Berlin 13854 59 Precision Resistor Paypal 0 Bid US $65.00 5d 8h 13m
Otto Wolff Berlin 13588 58 Precision Resistor Otto Wolff Berlin 13588 58 Precision Resistor Paypal 0 Bid US $65.00 5d 8h 13m
DAUPHINEE 9144 POTENTIOMETER PRECISION RESISTOR BOX DAUPHINEE 9144 POTENTIOMETER PRECISION RESISTOR BOX Paypal US $800.00 5d 14h 46m
3296w Variable Resistor Precision 50 pcs 3296w Variable Resistor Precision 50 pcs Paypal US $10.99 5d 20h 56m
3266W Variable Resistor Precision 50 pcs 3266W Variable Resistor Precision 50 pcs Paypal US $19.99 5d 20h 56m
1442 Ohm m PRECISION RESISTOR WIRE NICHROME NET 83g 1442 Ohm m PRECISION RESISTOR WIRE NICHROME NET 83g Paypal 0 Bid US $24.99 6d 8h 30m
Precision Non Inductive Load Resistor Dummy Load Precision Non Inductive Load Resistor Dummy Load Paypal 0 Bid US $6.95 6d 10h 10m
3362P Variable Resistor Precision 50 pcs 3362P Variable Resistor Precision 50 pcs Paypal US $11.99 7d 23h 19m
3266W Variable Resistor Precision 50 pcs 3266W Variable Resistor Precision 50 pcs Paypal US $19.99 7d 23h 22m