Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main()
- {
- int i,j,years;
- float debt,correctDebt,tax;
- printf("Entre com o valor da divida :\n"); scanf("%f",&debt);
- printf("Entre com a taxa de correcao :\n"); scanf("%f",&tax);
- printf("Entre com a quantidade de anos :\n"); scanf("%d",&years);
- correctDebt = debt;
- for (i = 2011; i <= 2011+years; i++)
- {
- printf("ANO : %d\n",i);
- for (j = 1; j <= 12; j++)
- {
- correctDebt = correctDebt*tax;
- printf("MES : %d // MONTANTE DE DIVIDA = %f\n",j,correctDebt);
- }
- printf("\n");
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment