miércoles, 22 de abril de 2015

propu_17



package propuesta.pkg17;

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

public class PROPUESTA17 {

    public static void main(String[] args) throws IOException {
        // TODO code application logic here
        int sa,mt,sactual=0;
            float tm;
            BufferedReader in=new BufferedReader(new  InputStreamReader(System.in));
            System.out.print("ingrese saldo :");
             sa=Integer.parseInt(in.readLine());//ojo
             System.out.print("ingrese tipo de movimiento:");
             tm=Integer.parseInt(in.readLine());//ojo
             System.out.print("ingrese monto:");
             mt=Integer.parseInt(in.readLine());//ojo
             if(tm== 1){
                  sactual = sa - mt;
            }else{
                  if(tm== 2){
                       sactual = sa + mt;
                  }
            }
           
            System.out.print("el saldo actual es:"+sactual);
           
           
    }
}

No hay comentarios:

Publicar un comentario