1
Fork 0
mirror of https://github.com/RGBCube/CSAssignments synced 2025-07-25 21:17:44 +00:00

Start making the interactive runner & use punctuation and stuff

This commit is contained in:
RGBCube 2022-11-05 21:51:51 +03:00
parent 58f5c52db5
commit 9a63e4127d
4 changed files with 80 additions and 25 deletions

View file

@ -8,7 +8,7 @@ int main() {
for (int i = 0; i < 21; i++) {
printf("Review number %i, enter rating (1 to 5): ", i+1);
// read the input as int
// Read the input as int.
scanf("%i", &ratings[i]);
int rating = ratings[i];
@ -18,7 +18,7 @@ int main() {
return 1;
}
// increment the star count for the stars
// Increment the star count for the stars.
// (-1 is because indexes start from 0)
++rating_frequency[rating-1];
total_stars += rating;