/* package whatever; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
{
double valorInicial = 100.0;
double taxa = 5;
System.
out.
println("Valor inicial: "+valorInicial
); double valorManipulado = gerarValorComTaxa(valorInicial, taxa);
System.
out.
println("Valor com Taxa: "+valorManipulado
);
valorManipulado = valorManipulado - ((taxa / 100) * valorManipulado);
System.
out.
println("Valor inicial: "+valorManipulado
); }
private static double gerarValorComTaxa(double valorInicial, double taxa){
return ((valorInicial / ((taxa / 100) - 1)) * -1);
}
}
LyogcGFja2FnZSB3aGF0ZXZlcjsgLy8gZG9uJ3QgcGxhY2UgcGFja2FnZSBuYW1lISAqLwoKaW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CgovKiBOYW1lIG9mIHRoZSBjbGFzcyBoYXMgdG8gYmUgIk1haW4iIG9ubHkgaWYgdGhlIGNsYXNzIGlzIHB1YmxpYy4gKi8KY2xhc3MgSWRlb25lCnsKCXB1YmxpYyBzdGF0aWMgdm9pZCBtYWluIChTdHJpbmdbXSBhcmdzKSB0aHJvd3MgamF2YS5sYW5nLkV4Y2VwdGlvbgoJewoJCWRvdWJsZSB2YWxvckluaWNpYWwgPSAxMDAuMDsKICAgICAgICBkb3VibGUgdGF4YSA9IDU7CgogICAgICAgIFN5c3RlbS5vdXQucHJpbnRsbigiVmFsb3IgaW5pY2lhbDogIit2YWxvckluaWNpYWwpOwogICAgICAgIGRvdWJsZSB2YWxvck1hbmlwdWxhZG8gPSBnZXJhclZhbG9yQ29tVGF4YSh2YWxvckluaWNpYWwsIHRheGEpOwogICAgICAgIFN5c3RlbS5vdXQucHJpbnRsbigiVmFsb3IgY29tIFRheGE6ICIrdmFsb3JNYW5pcHVsYWRvKTsKCiAgICAgICAgdmFsb3JNYW5pcHVsYWRvID0gdmFsb3JNYW5pcHVsYWRvIC0gKCh0YXhhIC8gMTAwKSAq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