Question: [c++ programming Error Question] When I tried to print out random number some weird number comes out sometimes 444444444----- , 55555555----, 6666----- . How to

[c++ programming Error Question]

When I tried to print out random number some weird number comes out sometimes 444444444----- , 55555555----, 6666----- . How to fix this error?[c++ programming Error Question] When I tried to print out random number

Also, the first array element should be 998 but it read only 98.

here is my code

#include  #include  #include  using namespace std; class random { private: double num; public: random() {} void allValues() { } void sumValues() { } void oddValue() { } void evenValue() { } void middleValue() { } void firstValue() { } void lastValue() { } void highestValue() { } void lowestValue() { } void sortValue() { } void linearSearch() { } }; int main() { int ranNum; //random number const int arraySize = 1000; // Array size int array[arraySize]; ofstream outfile; outfile.open("randomfile"); srand(time(0)); for(int i =0; i> array[i]; } file.close(); cout   594 255 640 979 594 255 640

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!