I've got the dropout number to show properly but I don't think I've done what you said to:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
|
#include <conio.h>
#include <stdio.h>
#include <windows.h>
#include <time.h>
/* Author hotchoc26 */
int main()
{
system("cls");
srand(time(0));
printf("Welcome! Press any key to begin.");
getchar();
int pos;
for (int pos = (1 + (rand() % 100)), max = 100, week = 1; pos <=100; max+=5, week++)
{
printf("\nWeek %d: %1d", week, pos);
pos = 1 + (rand() % max);
pos % 1 == 0;
}
printf("\nThe song dropped out at %i.\n");
return 0;
}
|
Is it possible to retrieve statistics from the numbers for the 'weeks'? Can I get, for example, the:
First number,
Lowest number of all numbers,
Biggest difference between any two consecutive numbers where the second is smaller/bigger than the first, from First number to Last number, which also shows these numbers,
Total number of numbers returned in the 1-100 range, 1-40 and 1-10 ranges,
Total number of occurances where two consecutive numbers are identical, where a value 100 is returned, or if three in a row return 100 * 2, four is *3 etc.,
Total number of occurances showing the value '1'. If true print 50, two occurances is 150, three is 300, 1,000, 1,500, 3,000, 10,000. If 7 or more, print 10,000.
Hopefully an easy 'total score' which adds up the numbers!
Here's basically how the game works I am trying to make a program of:
[url]
http://www.ukmix.org/forums/viewtopic.php?f=21&t=104927[/url]