Cria método para consertar as porcentagens

This commit is contained in:
axell-brendow 2021-03-07 14:53:27 -03:00
parent 30b32f21e6
commit 2da851008a
1 changed files with 5 additions and 0 deletions

View File

@ -1,4 +1,5 @@
#include <string.h>
#include <math.h>
typedef struct {
char id[30];
char name[200];
@ -94,5 +95,9 @@ void read_release_date(Musica *music, char field[]) {
music->release_date[7] = '/';
}
double handle_percentage(double value) {
return ceil(value) == value ? value / 100 : value;
}
}