this is what i started doing the biggest problem i am having is just figuring our how to take the data and printing out the proper amount of stars for each section. I am really new to coding so I may have gone wrong in a lot of places
Code:
#include <stdio.h>
#define SENTINEL 0
int main(void)
{
int dieRoll;
int total = 0;
int graph[total][6];
int one;
int two;
int three;
int four;
int five;
int six;
/* Accumulate all die rolls. */
printf("Enter a die roll or 0 to exit ", SENTINEL);
scanf("%d", &dieRoll); /* Get first die roll. */
while (dieRoll != SENTINEL)
{
printf("Next die roll? ", SENTINEL);
if ( dieRoll < 0 || dieRoll > 6)
{
printf("Next die roll?\n");
return 0;
else
{
for(one = 0; one == 1; one++)
{
scanf(" %d ", &graph[i][0]);
total++;
}
for(two = 0; two == 2; two++)
{
scanf(" %d ", &graph[i][1]);
total++;
}
for(three = 0; three == 3; three++)
{
scanf(" %d ", &graph[i][2]);
total++;
}
for(four = 0; four == 4; four++)
{
scanf(" %d ", &graph[i][3]);
total++;
}
for(five = 0; five == 5; five++)
{
scanf(" %d ", &graph[i][4]);
total++;
}
for(six = 0; six == 6; six++)
{
scanf(" %d ", &graph[i][5]);
total++;
}
}
printf("1 | %d\n", );
printf("2 | %d\n", );
printf("3 | %d\n", );
printf("4 | %d\n", );
printf("5 | %d\n", );
printf("6 | %d\n", );
}
return0;
}