แบบว่า ผมอยากให้โปรแกรมมันมีให้เลือกว่า
จะ บวก ลบ คูณ หรือหาร
โดยเป็นเมนูให้เลือกดังนี้
1. +
2. -
3. *
4. /
แบบนี้อะคับ
แต่โปรแกรมที่เขียนไว้ ผมทำให้มัน บวก อย่างเดียว
จะแก้ยังไงบ้างคับ
ช่วยแก้ไขให้ดูเป็นแนวทางหน่อยคับ
ขอบคุงคับ
class java1 {
public static void main(String[] arg) {
System.out.println("first number is " + arg[0]);
System.out.println("second number is " + arg[1]);
System.out.print("first number plus second number is " );
int a = Integer.parseInt(arg[0]);
int b = Integer.parseInt(arg[1]);
System.out.println(a +;
}
}