martes, 21 de abril de 2015

e_08



package ejercicio8;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class EJERCICIO8 {

    public static void main(String[] args) throws IOException {
        // TODO code application logic here
        float c,r,t,i,m;
 BufferedReader in=new BufferedReader(new  InputStreamReader(System.in));
 System.out.println("Capital: ");
 c=(float) Integer.parseInt(in.readLine());//ojo
 System.out.println("Tasa de interes: ");
 r=(float) Integer.parseInt(in.readLine());//ojo
 System.out.println("Tiempo: ");
 t=(float) Integer.parseInt(in.readLine());//ojo

 m=(float)(Math.pow((double)(1+r/100),(double) t))*c;
 i= m-c;
 System.out.println("");
 System.out.println("Interes:" + i);
  System.out.println("Monto:" + m);
 System.out.println();
        
    }
}

No hay comentarios:

Publicar un comentario