標題:
資料輸入 (三)
[打印本頁]
作者:
tonyh
時間:
2019-8-2 09:14
標題:
資料輸入 (三)
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-8-2 09:39
import java.io.Console;
public class Ch07
{
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-8-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.println("x%y"+(x%y));
}
}
複製代碼
作者:
余奕廷
時間:
2019-8-2 09:42
import java.io.Console;
public class Ch01
{
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-8-2 09:42
import java.io.Console;
public class ch01{
public static void main(String args[]){
Console c=System.console();
int x,y;
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-8-2 09:44
本帖最後由 許育慈 於 2019-8-2 10:34 編輯
import java.io.Console;
public class Ch06
{
public static void main(String args[])
{
int X,Y;
Console c=System.console();
System.out.print("請輸入X的值:");
X=Integer.parseInt(c.readLine());
System.out.print("請輸入Y的值:");
Y=Integer.parseInt(c.readLine());
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-8-2 09:44
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-8-2 09:44
import java.io.Console;
public class Ch06
{
public static void main(String args[])
{
int x, y;
Console c=System.console();
System.out.print("輸入x的值: ");
x=Integer.parseInt(c.readLine());
System.out.print("輸入y的值: ");
y=Integer.parseInt(c.readLine());
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-8-2 09:47
import java.io.Console;
public class CH05
{
public static void main(String args[])
{
int x, y;
Console c=System.console();
System.out.print("請輸入x的值:");
x=Integer.parseInt(c.readLine());
System.out.print("請輸入y的值:");
y=Integer.parseInt(c.readLine());
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-8-2 09:48
import java.io.Console;
public class Ch06
{
public static void main(String args[])
{
int x,y;
Console c=System.console();
System.out.print("輸入x的值: ");
x=Integer.parseInt(c.readLine());
System.out.print("輸入y的值: ");
y=Integer.parseInt(c.readLine());
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-8-2 09:50
import java.io.Console;
public class Ch06
{
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-8-2 09:50
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-8-2 09:50
import java.io.Console;
public class Ch06
{
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-8-2 09:53
import java.io.Console;
public class Ch06
{
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-8-2 09:57
import java.io.Console;
public class Ch06
{
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-8-2 10:00
import java.io.Console;
public class Ch06
{
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-8-2 10:33
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