> Basic c Array program needed using only basic c code methods? (NOT FOR CHEATING, FOR A NON-GRADED HOMEWORK ASSIGNMENT)?

Basic c Array program needed using only basic c code methods? (NOT FOR CHEATING, FOR A NON-GRADED HOMEWORK ASSIGNMENT)?

Posted at: 2014-12-18 
Your instructions are inconsistent. Is it an array of 50 or 500?

Whatever the case here is a program to do either.

#include

#include

#include

#define SIZE 50

#define MAX_VAL 500

int main(void){

int sum = 0;

int array[SIZE] = {0};



srand((unsigned) time(NULL));

int i = 0;

do{



array[i] = rand() % MAX_VAL + 1;

sum+= array[i];

printf("%d\n", array[i]);

i++;

}while(i < SIZE);



printf("Total = %d, Average = %f\n", sum, (float)sum/SIZE);

return 0;

}

Discover now the best sport betting system: http://sport-betting-tips.checkhere.info

Too many people think of sports betting as just something they do in their past time. However, many people can see the potential that exists if you manage to have the right sports betting strategy and correct approach to betting in general. Are you sick of losing? Interested in finding out how to turn your luck around? Do you want to know which sports betting strategies stand to help you make the most from your betting?

Any good strategy should allow you to place bets based on a systematic method. Of course there is always a random element or so called luck involved, but betting is all about stacking the odds in your favor. There should be no guess work involved or bets placed based on gut feelings. Betting is a business and it should be treated like one. Any money you use for betting needs to be separate from money you use for your daily life or anything else. How can you possibly expect to follow a strategy with money that was originally set aside to pay next week's rent with? You can't. This will help you to focus on the task of betting and remove any emotional strings attached to the money.

So what makes a good strategy or what should you look for in a strategy before you decide to implement it? Any good strategy needs to have a positive expectancy. This means that in the long run you will win. The hit rate of the strategy needs to be above 50% for you to be able to profit in the long run. An ideal win rate should be between 60 to 70%, because you will need to cover the fees and other expensive associated with betting. Is it feasible to expect you'll be able to find a system that has a 100% win rate? No, it isn't. The best you can do is find a system that has a positive expectancy and stick with it. In the long run you will make more money than you can possibly lose.

Keep whatever information and news you have about the teams as up to date as possible. Any changes in the teams makeup or factors that affect how the players play will great affect the potential outcome of a match. Make sure that you are constantly up to date on every aspect that affects the potential outcome of a match. Information is the key to winning at sports betting.

The homework question is:

"Create an array to store 50 random numbers.

The Random number should all be between 1 and 500.

Load all 500 elements of the array.

Total the numbers.

Display the average of the numbers.

Finally, display the numbers.

** No Menu needed. No Design Tool Required **"

The program needs to include some type of do while, or any of the if statements. Best answer is the person who accomplishes the program using c coding tools no more advanced than arrays and loading elements.