標題:
資料輸入 (三)
[打印本頁]
作者:
陳品肇
時間:
2019-7-1 23:37
標題:
資料輸入 (三)
import java.io.Console;
public class Ch05
{
public static void main(String args[])
{
int x, y;
Console c=System.console();
x=Integer.parseInt(c.readLine("輸入x的值: "));
y=Integer.parseInt(c.readLine("輸入y的值: "));
System.out.println("x+y="+(x+y));
System.out.println("x-y="+(x-y));
System.out.println("x*y="+(x*y));
System.out.println("x/y="+(x/y));
System.out.println("x%y="+(x%y));
}
}
複製代碼
作者:
林侑成
時間:
2019-7-2 09:34
import java.io.Console;
public class QWER
{
public static void main(String args[])
{
int x,y;
Console c=System.console();
x=Integer.parseInt(c.readLine("輸入x的值: "));
y=Integer.parseInt(c.readLine("輸入y的值: "));
System.out.println("x+y="+(x+y));
System.out.println("x-y="+(x-y));
System.out.println("x*y="+(x*y));
System.out.println("x/y="+(x/y));
System.out.println("x%y="+(x%y));
}
}
複製代碼
作者:
黃恆嘉
時間:
2019-7-2 09:37
import java.io.Console;
public class Ch03
{
public static void main(String args[])
{
int x, y;
Console c=System.console();
x=Integer.parseInt(c.readLine("輸入x的值: "));
y=Integer.parseInt(c.readLine("輸入y的值: "));
System.out.println("x+y="+(x+y));
System.out.println("x-y="+(x-y));
System.out.println("x*y="+(x*y));
System.out.println("x/y="+(x/y));
System.out.println("x mod y="+(x%y));
}
}
複製代碼
作者:
張閎鈞
時間:
2019-7-2 09:42
import java.io.Console;
public class Ch05
{
public static void main(String args[])
{
int x,y;
Console c=System.console();
x=Integer.parseInt(c.readLine("輸入x的值:"));
y=Integer.parseInt(c.readLine("輸入y的值:"));
System.out.println(x+"+"+y+"="+(x+y));
System.out.println(x+"-"+y+"="+(x-y));
System.out.println(x+"*"+y+"="+(x*y));
System.out.println(x+"/"+y+"="+(x/y));
System.out.print(x+"%"+y+"="+(x%y));
}
}
複製代碼
作者:
湯東緯
時間:
2019-7-2 09:42
import java.io.Console;
public class ABCD
{
public static void main(String args[])
{
int x,y;
Console c=System.console();
x=Integer.parseInt(c.readLine("輸入x的值: "));
y=Integer.parseInt(c.readLine("輸入y的值: "));
System.out.println("x+y="+(x+y));
System.out.println("x-y="+(x-y));
System.out.println("x*y="+(x*y));
System.out.println("x/y="+(x/y));
System.out.println("x%y="+(x%y));
}
}
複製代碼
作者:
呂昀宸
時間:
2019-7-2 09:43
import java.io.Console ;
public class nsez
{
public static void main(String args[])
{
int a,b;
Console c=System.console();
a=Integer.parseInt(c.readLine("輸入a的值: "));
b=Integer.parseInt(c.readLine("輸入b的值: "));
System.out.println("a+b="+(a+b));
System.out.println("a-b="+(a-b));
System.out.println("a*b="+(a*b));
System.out.println("a/b="+(a/b));
System.out.println("a%b="+(a%b));
}
}
複製代碼
作者:
蔣宗儒
時間:
2019-7-2 09:45
import java.io.Console;
public class juniorCh01
{
public static void main(String args[])
{
int m,n;
Console i =System.console();
m=Integer.parseInt(i.readLine("請輸入m的值: "));
n=Integer.parseInt(i.readLine("請輸入n的值: "));
System.out.println("m+n= "+(m+n));
System.out.println("m-n= "+(m-n));
System.out.println("m*n= "+(m*n));
System.out.println("m/n= "+(m/n));
System.out.println("m%n= "+(m%n));
}
}
複製代碼
作者:
黃安立
時間:
2019-7-2 09:46
import java.io.Console;
public class Ch05
{
public static void main(String args[])
{
int x, y;
Console c=System.console();
x=Integer.parseInt(c.readLine("輸入x的值: "));
y=Integer.parseInt(c.readLine("輸入y的值: "));
System.out.println("x+y="+(x+y));
System.out.println("x-y="+(x-y));
System.out.println("x*y="+(x*y));
System.out.println("x/y="+(x/y));
System.out.println("x%y="+(x%y));
}
}
複製代碼
作者:
潘承渙
時間:
2019-7-2 09:54
import java.lang.System;
import java.io.Console;
public class ch05
{
public static void main(String args[])
{
int x,y;
Console c = System.console();
x=Integer.parseInt(c.readLine("輸入x的值:"));
y=Integer.parseInt(c.readLine("輸入y的值:"));
System.out.println("x+y="+(x+y));
System.out.println("x-y="+(x-y));
System.out.println("x*y="+(x*y));
System.out.println("x/y="+(x/y));
System.out.println("x%y="+(x%y));
}
}
複製代碼
歡迎光臨 種子論壇 | 高雄市資訊培育協會學員討論區 (http://seed.istak.org.tw/)
Powered by Discuz! 7.2