随笔分类 - C
摘要:1 #include 2 3 //图元的类型 4 enum SHAPE_TYPE{ 5 RECT_TYPE = 0, 6 CIRCLE_TYPE = 1, 7 TRIANGLE_TYPE = 2, 8 SHAPE_NUM, 9 }; 10 //为了定义三角形的坐标而设 11 struct point{ 12 f...
阅读全文
摘要:执行结果: momo@momo ~/myfile/mydev/cc % compare !2150请输入需要比较的数:1 2 8 9 21输入的数据个数是:5max=21min=1
阅读全文
摘要:执行: momo@momo:mydev/cc $ a.outpid[8675]^Ccatch the signal 2^Ccatch the signal 2^Ccatch the signal 2
阅读全文
摘要:1 #include 2 #include 3 #include 4 5 int main(int argc,char **argv) 6 { 7 time_t time_now; 8 struct tm *curr_time = NULL; 9 time(&time_now); 10 printf("time_now:[%ld]\n",...
阅读全文
摘要:1 #include 2 #include 3 #include 4 #include 5 /**chartoasc:char -> ascii**/ 6 int chartoasc(char c) 7 { 8 int i=0; 9 i = c; 10 return i; 11 } 12 /**asctochar:ascii -> char**/...
阅读全文
浙公网安备 33010602011771号