2008年3月17日 星期一

Homework 3-17-2008_Project 3 of Chap. 2.

import java.util.Scanner;

public class Homework20080317Part3
{
public static void main(String[] args)
{
System.out.println("please enter two integers.");
Scanner keyboard = new Scanner(System.in);
int first=keyboard.nextInt();
int second=keyboard.nextInt();

System.out.println("sum :"+(first+second));
System.out.println("difference :"+(first-second));
System.out.println("product :"+(first*second));
}
}


結果:

沒有留言: