From 2da851008a1d547f27594bd986a90381bd7fbc4a Mon Sep 17 00:00:00 2001 From: axell-brendow Date: Sun, 7 Mar 2021 14:53:27 -0300 Subject: [PATCH] =?UTF-8?q?Cria=20m=C3=A9todo=20para=20consertar=20as=20po?= =?UTF-8?q?rcentagens?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tps/fonte/musica.cpp | 5 +++++ 1 file changed, 5 insertions(+) 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; +} + }