Изменил(а) на 'cv3/program.c'

This commit is contained in:
Oleksandr Hryshchenko 2021-10-22 11:58:39 +00:00
parent 3abd673a7d
commit 054ef15374

View File

@ -53,10 +53,10 @@ bool calculatorLogic(char buffer[SIZE][SIZE]){
for(int i = currentlyInBuffer-2; currentlyInBuffer > i; currentlyInBuffer--)
memset(buffer[currentlyInBuffer], '\0', SIZE);
gcvt(temporaryDecimal, 10, buffer[currentlyInBuffer++]);
gcvt(temporaryDecimal, 10, buffer[currentlyInBuffer]);
for(int i = 0; i < currentlyInBuffer; i++){
if(i == currentlyInBuffer-1)
for(int i = 0; i <= currentlyInBuffer; i++){
if(i == currentlyInBuffer)
printf("%0.2f \n", roundf(atof(buffer[i]) * 100) / 100);
else
printf("%0.2f ", roundf(atof(buffer[i]) * 100) / 100);