上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 22 下一页
摘要: https://pintia.cn/problem-sets/12/problems/345 解决舍入问题。 1 #include <stdio.h> 2 #include <math.h> 3 4 int main(void) 5 { 6 struct p 7 { 8 double x; 9 do 阅读全文
posted @ 2020-01-15 14:34 jason2018 阅读(218) 评论(0) 推荐(0) 编辑
摘要: https://pintia.cn/problem-sets/12/problems/342 1 bool palindrome(char *s) 2 { 3 int n, i, k; 4 bool ret; 5 6 n = strlen(s); 7 i = 0; 8 k = n - 1; 9 wh 阅读全文
posted @ 2020-01-14 19:41 jason2018 阅读(135) 评论(0) 推荐(0) 编辑
摘要: 1 #include <stdio.h> 2 3 struct time 4 { 5 int hour; 6 int minute; 7 int second; 8 }; 9 int main(void) 10 { 11 int n, temp; 12 struct time t1; 13 14 s 阅读全文
posted @ 2019-12-26 08:54 jason2018 阅读(343) 评论(0) 推荐(0) 编辑
摘要: 1 #include <stdio.h> 2 int main(void) 3 { 4 printf("%zd\n", sizeof(5L)); //long int型整数 5 printf("%zd\n", sizeof(5LL)); //long long int型整数 6 7 printf(" 阅读全文
posted @ 2019-12-23 15:44 jason2018 阅读(1035) 评论(0) 推荐(0) 编辑
摘要: 1 #include <stdio.h> 2 int main(void) 3 { 4 printf("sizeof(short int) = %zd\n", sizeof(short int)); 5 printf("sizeof(int) = %zd\n", sizeof(int)); 6 pr 阅读全文
posted @ 2019-12-23 15:01 jason2018 阅读(143) 评论(0) 推荐(0) 编辑
摘要: 1 #include <stdio.h> 2 int leap(int year); //闰年返回1,否则返回0 3 int yeardays(int year, int month, int day); //返回一年中的第几天 4 int days(int year); //返回一年的总天数 5 阅读全文
posted @ 2019-12-22 17:04 jason2018 阅读(314) 评论(0) 推荐(0) 编辑
摘要: 1 #include <stdio.h> 2 #include <stdlib.h> 3 4 int main(void) 5 { 6 int n; 7 double *p; 8 scanf("%d", &n); 9 10 p = (double *)calloc(n, sizeof(double) 阅读全文
posted @ 2019-12-20 16:26 jason2018 阅读(630) 评论(0) 推荐(0) 编辑
摘要: 1 #include <stdio.h> 2 #include <string.h> 3 4 int main(void) 5 { 6 char str[5][80]; //二维数组保存5个字符串 7 int i, j; 8 9 for (i = 0; i < 5; i++) 10 { 11 sca 阅读全文
posted @ 2019-12-20 15:01 jason2018 阅读(1183) 评论(0) 推荐(0) 编辑
摘要: 1 void StringCount(char* s) 2 { 3 int len = 0; 4 char* p = s; 5 int cap_letter = 0; 6 int sma_letter = 0; 7 int space = 0; 8 int digit = 0; 9 int othe 阅读全文
posted @ 2019-12-20 12:40 jason2018 阅读(1078) 评论(0) 推荐(0) 编辑
摘要: 1 void delchar(char *str, char c) 2 { 3 int i, j; 4 char a[MAXN]; 5 6 j = 0; 7 for (i = 0; str[i] != '\0'; i++) 8 { 9 if (str[i] != c) 10 { 11 a[j] = 阅读全文
posted @ 2019-12-20 12:18 jason2018 阅读(770) 评论(0) 推荐(0) 编辑
上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 22 下一页