You are on page 1of 1

import java.util.

Scanner;

public class Review1


{
public static void main (String[] args)
{
Scanner scan=new Scanner(System.in);
float a,b;
int sum,difference,product,quotient;

System.out.println("Input first floating number: ");


a=scan.nextFloat();
System.out.println("Input second floating number: ");
b=scan.nextFloat();
sum=(int) (a+b);
difference=(int) (a-b);
product=(int) (a*b);
quotient=(int) (a/b);
System.out.println("The sum of "+a+"and "+b+"is "+sum);
System.out.println("The product of "+a+"and "+b+"is "+product);
System.out.println("The difference of "+a+"and "+b+"is "+difference);
System.out.println("The quotient of "+a+"and "+b+"is "+quotient);
}

You might also like