Question: Hello! I need help with debugging my solution! When I run it on an online compiler it seems okay and I am getting my results,

Hello! I need help with debugging my solution! When I run it on an online compiler it seems okay and I am getting my results, however when I run it on DEV C++ it gives me some errors. I think my solution is correct, but I am not 100% sure. Please provide step by step explanation and overall let me know what I am doing wrong here! Thanks!

THIS IS A C PROGRAMMING CLASS SO MY SOLUTION IS WRITTEN IN C

Assignment Requirements:

Write a c program along with a design tool for the following specifications: the client owns a small business. the client needs a simple program that will store the results of up to 10,000 sale transaction amounts. The program should randomly populate a random number of sales.

the program should randomly populate a random number of sales. between 500-10,000

example run your program generates the random number 666. this random number will represent the esize for your array.

Next you will loop ezise times. within each loop. you will generate a new random number (you decide the domain of the values.) you will store each of the random values in your array

18

678

228

122

874

389

159

output the values within the array in columns of 10 numbers in each column (other than the last column it will have 10 or less values)

calculate and display the following:

Largest number:

smallest number:

average of the number:

***Format your columns so they come out neatly.

THIS IS MY SOLUTION BELOW

#include #include #include

int main() { srand(time(NULL)); int arr[10000]; int sales=(rand()%(10000-500+1))+500; printf("The number of sales :%d ",sales); printf(" "); for(int i=0;ilargestVal) largestVal=arr[i]; if(arr[i]

THESE ARE THE ERRORS I GET IN THE COMPILER Hello! I need help with debugging my solution! When I run it

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!