2008年12月30日 星期二

2008年10月28日 星期二

2008年10月21日 星期二

改正錯誤3.2程式


#include /* Standard Input/Output function declarations */
#include

int main( void ) {
float fRadius; /* Radius of circle */
float fArea; /* Area of circle */
/* [a] : Prompt User for "radius of circle" */
printf("============================================\n");
printf("Please input the circle radius (Radius > 0):");
scanf("%f", &fRadius);

/* [b] : Check that the radius in greater than zero */
if( fRadius <= 0 ) {
printf("ERROR >> Circle radius must be greater than zero\n");
exit (1);<------錯誤 要砍掉
}
/* [c] : Compute Area of Circle */
fPi = 4.0*atan( 2.0 );
fArea = fPi*fRadius*fRadius

/* [d] : Print Radius and Area */

printf("Radius of Circle = %8.3f \n", fRadius );
printf("Area of Circle = %8.3f \n", fArea );

return (0);
}
這是改正3.2的錯誤,如果有錯請多多指教

2008年9月30日 星期二

有聽沒有懂


今天老師所交的!有點聽不太懂!!一堆程式語言
只好大概的打一下!!

以下是自行練習!!

打的有點亂

2008年9月23日 星期二

課程練習


#include
#define PI 3.1415926
int(整數) main(主程式) (void) {
printf("approximate value of PI =%f(浮點小數/控制字元) \n(換一行)PI(=3.1415926));
return (0);
}
先開啟記事本--->複製上列程式--->按所有檔案--->存pi.c

開啟micro visual c++ --->按file--->new--->win32 app--->打test1
--->

2008年9月16日 星期二

全新開張

這是新開的BLOG
歡迎大家多多來看