package ch02;
import java.util.Scanner;
public class Test2_8 {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s1, s2, s3;
		System.out.println("请输入第一个字符串！");
		s1 = sc.next(); // 读入一行
		System.out.println("请输入第而个字符串！");
		s2 = sc.next(); // 读入一行
		s3 = s1 + s2;
		System.out.println("运行结果是：" + s1 + "连接" + s2 + "=" + s3);
		System.out.println("----------------------------------");
		int x, y, z;
		System.out.println("请输入第一个整数！");
		x = sc.nextInt();
		System.out.println("请输入第二个整数！");
		y = sc.nextInt();
		z = x + y;
		System.out.println("运行结果是:" + x + "+" + y + "=" + z);
		System.out.println("----------------------------------");
		double a, b, c;
		System.out.println("请输入第一个实数！");
		a = sc.nextDouble();
		System.out.println("请输入第二个实数！");
		b = sc.nextDouble();
		c = a + b;
		System.out.println("运行结果是:" + a + "+" + b + "=" + c);
	}
}
