PEDIR POR BUFFEREDREADER

LOS VIDEOS ESTAN EN http://www.youtube.com/user/rvnrodrigo
import javax.swing.*;
import java.io.*;
public class pedir_uno
{
   public static void main(String args[]) throws Exception
    {
       BufferedReader p=new BufferedReader(new InputStreamReader(System.in));
       double a,b,r;
       System.out.print("DAME A: ");
       a=Double.parseDouble(p.readLine());
       System.out.print("DAME B: ");
       b=Double.parseDouble(p.readLine());
       r=a+b;
       System.out.print("LA SUMA ES: "+r);
    }
}

0 comentarios:

Publicar un comentario