C File Processing

 

1. 使用for 迴圈印出1256整數之二進位、8進位、與16進位的轉換表。輸出至一檔案。

Write a program that prints a table of the binary, octal and hexadecimal equivalents of the decimal numbers in the range 1 through 256.  Print the results to a file.

3_1.c, 3_1.exe, 3_1out.dat

 

(Exercise)

2. 使用for 迴圈印出一介於19941999的年曆,並輸出至一檔案。

Write a program that inputs the year in the range 1994 through 1999 and uses for-loop repetition to produce a condensed, neatly printed calendar.  Print the results to a file.  Watch out for leap years.

3_2.c, 3_2.exe, 3_2out.dat

 

3. 從檔案讀取100個整數,並決定中位數。

Write a program to input 100 integers from a file, sort an array and determine median element's value.

3_3.c, 3_3.exe, 3_3in.dat

 

(Exercise)

4. 從檔案讀取100個整數,並決定平均值與標準差。

Write a program to input 100 integers from a file, and then determine the mean and standard deviation.

3_4.c, 3_4.exe, 3_3in.dat

 

http://home.kimo.com.tw/abc9250/BMP_FILE.htm

5. 讀取一BMP檔,並增加其亮度。

Write a program to read a BMP file, and increase its brightness.

3_5.c, 3_5.exe, moncalib.bmp, new.bmp

 

(Exercise)

6. 讀取一BMP檔,並將R, G, B顏色互換。(R = G, G = B, B = R)

Write a program to read a BMP file, and swap its R, G, and B components

3_6.c, 3_6.exe, moncalib.bmp, new2.bmp