随笔分类 -  c语言

上一页 1 ··· 4 5 6 7 8 9 下一页
摘要:1 #include 2 3 int main() 4 { 5 unsigned int a = 1, b = 0; 6 while (a>0) 7 { 8 a++; 9 } 10 11 printf("unsigned int数据类型最大数是:%u\n", a-1 ); 12 13 unsigne... 阅读全文
posted @ 2019-06-14 14:34 jason2018 阅读(1248) 评论(0) 推荐(0)
摘要:1 /* 32位系统 */ 2 #include 3 4 int main() 5 { 6 int a = 0, b = 0; 7 while (++a>0) 8 { 9 ; 10 } 11 printf("int数据类型最大数是:%d\n", a - 1); 12 13 int n = a - 1; 14 ... 阅读全文
posted @ 2019-06-14 14:04 jason2018 阅读(1960) 评论(0) 推荐(0)
摘要:1 #include<stdio.h> 2 3 int main(void) 4 { 5 char ch; 6 int start; 7 int count; 8 9 ch = getchar(); 10 count = 0; 11 /*单词开始标志,1表示单词开始,0表示单词结束*/ 12 sta 阅读全文
posted @ 2019-06-07 15:30 jason2018 阅读(1934) 评论(0) 推荐(0)
摘要:1 #include 2 3 int reverse( int number ); 4 5 int main() 6 { 7 int n; 8 9 scanf("%d", &n); 10 printf("%d\n", reverse(n)); 11 12 return 0; 13 } 14 15 /* 你的代码将被嵌在这里 */ 16... 阅读全文
posted @ 2019-06-07 08:47 jason2018 阅读(2579) 评论(0) 推荐(0)
摘要:1 #include<stdio.h> 2 #include<math.h> 3 4 int prime(int p); 5 void Goldbach(int n); 6 7 int main() 8 { 9 int m, n, i, cnt; 10 11 scanf_s("%d %d", &m, 阅读全文
posted @ 2019-06-04 09:02 jason2018 阅读(1993) 评论(0) 推荐(0)
摘要:1 #include<stdio.h> 2 3 int fib(int n); 4 void PrintFN(int m, int n); 5 int main(void) 6 { 7 int m, n, t; 8 9 scanf_s("%d %d %d", &m, &n, &t); 10 prin 阅读全文
posted @ 2019-06-03 09:30 jason2018 阅读(5014) 评论(0) 推荐(0)
摘要:1 #include<stdio.h> 2 3 int factorsum(int number); 4 void PrintPN(int m, int n); 5 6 int main(void) 7 { 8 int m, n; 9 10 scanf_s("%d %d", &m, &n); 11 阅读全文
posted @ 2019-06-02 11:22 jason2018 阅读(6617) 评论(0) 推荐(0)
摘要:1 #include 2 3 int fn(int a, int n); 4 int SumA(int a, int n); 5 6 int main() 7 { 8 int a, n; 9 10 scanf_s("%d %d", &a, &n); 11 printf("fn(%d, %d) = %d\n", a, n, fn(a, n)); 1... 阅读全文
posted @ 2019-06-02 10:31 jason2018 阅读(1256) 评论(0) 推荐(0)
摘要:1 #include 2 3 int main() 4 { 5 6 int i; 7 char ch_lower, ch_upper; 8 9 for (i = 1; i = 'a' && ch_lower %c->%d\n", ch_lower, ch_upper, ch_upper % 10); 16 } 17 ... 阅读全文
posted @ 2019-06-02 10:14 jason2018 阅读(499) 评论(0) 推荐(0)
摘要:1 #include 2 3 int main() 4 { 5 char ch; 6 printf("input characters:"); 7 ch = getchar(); 8 while (ch!='\n') 9 { 10 if (ch >= 'A' && ch = 'a' && ch <= 'z') 17 ... 阅读全文
posted @ 2019-06-02 09:37 jason2018 阅读(375) 评论(0) 推荐(0)
摘要:修改版 阅读全文
posted @ 2019-05-30 17:01 jason2018 阅读(522) 评论(0) 推荐(0)
摘要:1、 阅读全文
posted @ 2019-05-30 16:02 jason2018 阅读(149) 评论(0) 推荐(0)
摘要:1、 2、参考老师讲解视频修改版 阅读全文
posted @ 2019-05-30 14:15 jason2018 阅读(935) 评论(0) 推荐(0)
摘要:1、枚举 1、辗转相除法 阅读全文
posted @ 2019-05-30 10:55 jason2018 阅读(170) 评论(0) 推荐(0)
摘要:1、 2、猜数字 3、平均数 4、 阅读全文
posted @ 2019-05-29 16:28 jason2018 阅读(130) 评论(0) 推荐(0)
摘要:1 #include 2 3 int main() 4 { 5 int grade; 6 scanf_s("%d", &grade); 7 grade = grade / 10; 8 switch (grade) 9 { 10 case 10: 11 case 9:printf("A\n"); brea... 阅读全文
posted @ 2019-05-29 11:15 jason2018 阅读(1609) 评论(0) 推荐(0)
摘要:关系表达式的值反映了关系运算(比较)的结果,它是一个逻辑两,取值“真”或“假”。 由于c语言没有逻辑型数据,就用整数1代表“真”,0代表“假”。 这样,关系表达式的值就是1或0,它的类型是整形。 阅读全文
posted @ 2019-05-29 08:39 jason2018 阅读(185) 评论(0) 推荐(0)
摘要:1、const 2、整除 整数 / 整数,得到的结果也是整数。 3、浮点数和整数运算 当浮点数和整数放到一起运算时,c语言会将整数转换成浮点数,然后进行浮点数的运算。 阅读全文
posted @ 2019-05-28 14:46 jason2018 阅读(170) 评论(0) 推荐(0)
摘要:1 #include 2 #include 3 4 double funcos(double e, double x); 5 6 int main() 7 { 8 double e, x; 9 10 scanf_s("%lf %lf", &e, &x); 11 printf("cos(%.2f) = %.6f\n", x, funcos(e, ... 阅读全文
posted @ 2019-05-27 13:40 jason2018 阅读(1206) 评论(0) 推荐(0)
摘要:1 #include 2 int narcissistic(int number); 3 void PrintN(int m, int n); 4 5 int main() 6 { 7 int m, n; 8 9 scanf_s("%d %d", &m, &n); 10 if (narcissistic(m)) printf("%d is a na... 阅读全文
posted @ 2019-05-27 11:10 jason2018 阅读(4445) 评论(0) 推荐(0)

上一页 1 ··· 4 5 6 7 8 9 下一页