標題:
五則運算 (三)
[打印本頁]
作者:
tonyh
時間:
2014-4-19 14:54
標題:
五則運算 (三)
public class ch04
{
public static void main(String args[])
{
int x=5,y=3;
System.out.println("當x為"+x+", y為"+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));
}
}
複製代碼
作者:
許逸群
時間:
2014-4-19 15:00
public class ch04
{
public static void main(String args[])
{
int x=5,y=3;
System.out.println("當x為"+x+", y為"+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));
}
}
複製代碼
作者:
劉泳鱔
時間:
2014-4-19 15:02
public class ch04
{
public static void main(String args[])
{
int x=5,y=3;
System.out.println("當x為"+x+", y為"+y+"時");
System.out.println("5+3="+(5+3));
System.out.println("5-3="+(5-3));
System.out.println("5*3="+(5*3));
System.out.println("5/3="+(5/3));
System.out.println("5%3="+(5%3));
}
}
複製代碼
作者:
鎧言
時間:
2014-4-19 15:06
public class ch04
{
public static void main(String args[])
{
int x=5,y=3;
System.out.println("當x="+x+",y="+y+"時");
System.out.println("x+y="+(5+3));
System.out.println("x-y="+(5-3));
System.out.println("x*y="+(5*3));
System.out.println("x/y="+(5/3));
System.out.println("x%y="+(5%3));
}
}
複製代碼
作者:
黃崇維
時間:
2014-4-23 16:46
public class ch04
{
public static void main(String args[])
{
int x=5,y=3;
System.out.println("當x的值為"+x+",y的值為"+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));
}
}
複製代碼
作者:
張瀚仁
時間:
2014-4-23 18:53
import java.lang.System;
public class ch04
{
public static void main(String args[])
{
int x=5,y=3;
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));
}
}
複製代碼
作者:
林以諾
時間:
2014-4-27 10:38
import java.lang.*;
public class ch04
{
public static void main(String args[])
{
int x=5, y=3;
System.out.println("當x="+x+"y="+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