標題:
資料輸入 (三)
[打印本頁]
作者:
tonyh
時間:
2019-7-2 09:16
標題:
資料輸入 (三)
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 Ch06
{
public static void main(String args[])
{
int x.y;
Console c=System.console();
x=Integer.parseInt(c.readLine("Enter x's value: "));
y=Integer.parseInt(c.readLine("Enter y's value: "));
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 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: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: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:37
import java.io.Console;
public class Ch05
{
public static void main(String args[])
{
int x, y;
Console c=System.consoie();
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:38
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-7-2 09:38
import java.io.Console;
public class ch05
{
public static void main(String aargs[])
{
float x,y;
Console c=System.console();
x=Float.parseFloat(c.readLine("請輸入x的值:"));
y=Float.parseFloat(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:39
import java.io.Console;
public class Ch08
{
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:39
import java.io.Console;
public class Ch05
{
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-7-2 09:40
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:41
import java.io.Console;
public class Ch05
{
public static void main(String args[])
{
int x,y,z;
Console c=System.console();
x=Integer.parseInt(c.readLine("輸入X的值:"));
y=Integer.parseInt(c.readLine("輸入y的值:"));
z=Integer.parseInt(c.readLine("輸入z的值:"));
System.out.println("x+y+z="+(x+y+z));
System.out.println("x-y-z="+(x-y-z));
System.out.println("x*y*z="+(x*y*z));
System.out.println("x/y/z="+(x/y/z));
System.out.println("x%y%z="+(x%y%z));
}
}
複製代碼
作者:
李沛儒
時間:
2019-7-2 09:41
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:41
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("Please enter x's value: "));
y=Integer.parseInt(c.readLine("Please enter y's value: "));
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: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-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.println("x%y="+(x%y));
}
}
複製代碼
作者:
林宥杰
時間:
2019-7-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-7-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-7-2 09:45
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:48
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: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-7-2 10:13
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%y="+(x%y));
}
}
複製代碼
回復
1#
tonyh
歡迎光臨 種子論壇 | 高雄市資訊培育協會學員討論區 (http://istak.org.tw/seed/)
Powered by Discuz! 7.2