diff --git a/tps/fonte/musica.cpp b/tps/fonte/musica.cpp index 918424b..feb0278 100644 --- a/tps/fonte/musica.cpp +++ b/tps/fonte/musica.cpp @@ -1,4 +1,5 @@ #include +#include 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; +} + }