C Programming representing array values with stars
Go to solution
Solved by Sauron,
I tried adding for (star = 0; star < lottery; star++) inside the first loop but that didn't work. I'm not actually sure what i'd need to write in this second for loop.
int a;for (i = 0; i < 49; i++) { printf(" %2d (%d) | ", i+1, lottery[i]); for(a = 0; a < lottery[i]; a++) printf("*"); printf("\n"); }

Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now