Tuesday, February 26, 2013

Input Scanner



import java.util.Scanner; 

public class sd
{   
    public static void main (String args[])
    {
                Scanner input = new Scanner(System.in);   
                Double df,er,td,io;
                System.out.print("Enter first num: ");
                df = input.nextDouble();

                System.out.print("Enter second num: ");
                er = input.nextDouble();
                               
                System.out.print("Enter third num: ");  
                td = input.nextDouble();
                               
                io = df + er * td;
               
                System.out.print(df + " ert ");
                System.out.printf("io");
               
    }
   
}







No comments:

Post a Comment