PIXNET

目前分類:Java (5)

瀏覽方式: 標題列表 簡短摘要

import java.text.NumberFormat;

public class test1
{
    public static void main(String[] args)

chph 發表在 痞客邦 留言(1) 人氣()

Char與Ascii互轉
public class charCovert{
    public static void main(String[] args){
        AsciiToChar(65);
        CharToAscii('Z');

chph 發表在 痞客邦 留言(0) 人氣()

第一題
設計程式,利用引數輸入2個整數,然後將數字由小到大顯示出來,若相等則顯示"兩數相等"。 例如:
輸入: java Exam01 25 10
輸出:10 25輸入:java Exam01 10 25
輸出:10 25 輸入:java Exam01 25 25

chph 發表在 痞客邦 留言(0) 人氣()

For given value of N (say, 30), first write down all the integers from 2 to N:
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30

Delete all the multiples of the first number in the sequence (2):
2 3 5 7 9 11 13 15 17 19 21 23 25 27 29

chph 發表在 痞客邦 留言(0) 人氣()

1+...+N  -  使用三段繼承


// addtoN.java
public class addtoN
{
    public static void main( String[] args )

chph 發表在 痞客邦 留言(0) 人氣()

Close

您尚未登入,將以訪客身份留言。亦可以上方服務帳號登入留言

請輸入暱稱 ( 最多顯示 6 個中文字元 )

請輸入標題 ( 最多顯示 9 個中文字元 )

請輸入內容 ( 最多 140 個中文字元 )

reload

請輸入左方認證碼:

看不懂,換張圖

請輸入驗證碼