TOPIC
Runtime error
KaioLou asked 6 years ago
Alguém pode me dizer o que está errado?
#include <stdio.h>
int main(void)
{
int N;
int ced = 100;
int divisao;
int resto;
scanf("%d", &N);
divisao = N / ced;
resto = N % ced;
for(int i = 0; i < 7; i++)
{
printf("%d nota(s) de R$ %d,00\n", divisao, ced);
ced /= 2;
if(i == 1)
{
ced -= 5;
}
divisao = resto / ced;
resto = resto % ced;
}
}
This topic has not been answered yet. Be the first!