c_cpp Uri 2033 - (WA 70%)

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了c_cpp Uri 2033 - (WA 70%)相关的知识,希望对你有一定的参考价值。

/*  Juros Sobre o Empréstimo - Problemas nº 2033 - Matematica
  https://www.urionlinejudge.com.br/judge/pt/problems/view/2033
  Problema com Wrong answer (70%) */  

#include <stdio.h>
#include <math.h>

int main()
{
	int tempo;
	double capital, juroSimples, juroCompos, diferenca, expo, txJuros;
	
	while(scanf("%lf", &capital) != EOF)
	{
		scanf("%lf", &txJuros);
		scanf("%d", &tempo);
		
		juroSimples = capital * txJuros * tempo;
		expo = pow(1 + txJuros, tempo);
		
		juroCompos = (capital * expo) - capital;
		diferenca = juroCompos - juroSimples;
				
		printf("DIFEREN%cA DE VALOR = %.2lf\n", 128, diferenca);
		printf("JUROS SIMPLES = %.2lf\n", juroSimples);
		printf("JUROS COMPOSTO = %.2lf\n\n", juroCompos);
		
	}
		
	return 0;
}

以上是关于c_cpp Uri 2033 - (WA 70%)的主要内容,如果未能解决你的问题,请参考以下文章

c_cpp (Uri Judge)Problema 2033 C ++ - 接受

c_cpp 70.爬楼梯

c_cpp 70.cpp

c_cpp 比赛Uri - Monopolio

c_cpp Uri 1728 - (已接受)

c_cpp 【70】查找并绘制轮廓综合示例