import java.util.Scanner;
public class BorrowABook
{
public static void main(String[] args)
{
BorrowABook rate = new BorrowABook();
Scanner sc = new Scanner(System.in);
System.out.println("请输入价格,用空格隔开");
double num = sc.nextDouble();
double num1 = sc.nextDouble();
double [] a = {num,num1};
System.out.println("打折前的价格");
for (int i = 0;i<a.length;i++)
{
System.out.println(a[i]+"元");
}
rate.chang(a);
System.out.println("打折后");
for (int j = 0;j < a.length;j++)
{
System.out.println(a[j]+"元");
}
}
public void chang (double[] i)
{
for (int j = 0;j<i.length;j++)
{
i[j] = i[j] *0.5;
}
}
}