import java.util.Scanner;
public class averageIncome
{
public static void main(String[] args)
{
int i,average;
System.out.println("請輸入總人數");
Scanner keyboard = new Scanner(System.in);
int number = keyboard.nextInt();
System.out.println("請輸入性別與收入");
int[] genderAndIncome = new int[number];
for()
}
}
2007年10月26日 星期五
Lab Fibonacci numbers
2007年10月25日 星期四
Bonus: Lab for-loop
Homework 10-12-2007: Finding the max and the min
2007年10月12日 星期五
Lab: Tax Calculation
Study Display 3.1. Based on the income tax rate in Taiwan,
calculate the income tax of a person whose annual income is 1,000,000 or 2,000,000.
所得1000000
所得:2000000
calculate the income tax of a person whose annual income is 1,000,000 or 2,000,000.
所得1000000
所得:2000000
Quiz 10-12-2007
1. Let i, j be two integers. Write a program to exchange their values. How can you show your program is correct.
2. The identifier BufferedReader is normally abbreviated as BR in programming language C. However, Java programmers normally do not use abbreviations for identifiers. What are the advantages and disadvantages of not using abbreviations?
ans:在C語言中使用縮寫的原因是因為要節省記憶體的損耗,不過那是在之前記憶體很昂貴時,才需要這麼做。將變數已完整的名稱命名可以讓使用者更容易看懂你所編寫的程式,這是不使用縮寫的好處,壞處就是會佔更多的資源,不過這應該無傷大雅。
2. The identifier BufferedReader is normally abbreviated as BR in programming language C. However, Java programmers normally do not use abbreviations for identifiers. What are the advantages and disadvantages of not using abbreviations?
ans:在C語言中使用縮寫的原因是因為要節省記憶體的損耗,不過那是在之前記憶體很昂貴時,才需要這麼做。將變數已完整的名稱命名可以讓使用者更容易看懂你所編寫的程式,這是不使用縮寫的好處,壞處就是會佔更多的資源,不過這應該無傷大雅。
2007年10月5日 星期五
訂閱:
文章 (Atom)