Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Assignment-13/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@ Enter scoring total for Player #2: 15
Enter scoring total for Player #3: 17
Enter scoring total for Player #4: 21
Enter scoring total for Player #5: 24
Player #5 had the highest scoring average at 19.00 points per game.
Player #5 had the highest scoring average at 19.75 points per game.
```
3 changes: 1 addition & 2 deletions Assignment-13/assignment13.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,8 @@ int main(void)

//initialize a new float variable which will be our average
//use the (float) operator to change the integer variable being divided into a float operation
float ppg = (float)(highest_total / 4);
float ppg = highest_total / 4.0f;
printf("Player #%d had the highest scoring average at %.2f points per game.\n", player_id, ppg);

return 0;

}