随笔分类 - c语言
摘要:1 #include <stdio.h> 2 #include <stdlib.h> 3 4 struct stud_node { 5 int num; 6 char name[20]; 7 int score; 8 struct stud_node* next; 9 }; 10 11 struct
阅读全文
摘要:1 #include <stdio.h> 2 #include <string.h> 3 int main(void) 4 { 5 char s[4][19]; 6 int len; 7 8 for (int i = 0; i < 4; i++) 9 { 10 scanf("%s", s[i]);
阅读全文
摘要:1 #include <stdio.h> 2 #define MAXS 30 3 4 char *search(char *s, char *t); 5 void ReadString( char s[] ); /* 裁判提供,细节不表 */ 6 7 int main() 8 { 9 char s[
阅读全文
摘要:1 #include <stdio.h> 2 3 #define MAXS 10 4 5 char* match(char* s, char ch1, char ch2); 6 7 int main() 8 { 9 char str[MAXS], ch_start, ch_end, * p; 10
阅读全文
摘要:1 #include <stdio.h> 2 #include <stdlib.h> 3 #include <string.h> 4 5 typedef struct node 6 { 7 char name[11]; 8 char birthday[9]; 9 char phone[18]; 10
阅读全文
摘要:1 #include <stdio.h> 2 3 int main(void) 4 { 5 int n, i, j, length, k, m; 6 char array[10][10]; 7 int x1, y1, x2, y2; 8 int isError = 0; 9 int isRight
阅读全文
摘要:1 #include <stdio.h> 2 3 int main(void) 4 { 5 int n, i, j, number; 6 int array[10][10]; 7 int top, bottom, left, right; 8 9 scanf("%d", &n); 10 top =
阅读全文
摘要:1 #include <stdio.h> 2 3 int main(void) 4 { 5 int n; 6 int i, j, array[11][11] = {{0}}; 7 8 scanf("%d", &n); 9 array[0][1] = 1; 10 //生成杨辉三角形 11 for (i
阅读全文
摘要:#include <stdio.h> //返回number装到箱子的索引 int myFunc(int array[], int length, int number) { int i, index = -1; for (i = 0; i < length; i++) { if (array[i]
阅读全文
摘要:用链表的方法解决 #include <stdio.h> #include <stdlib.h> typedef struct node { int index; int number; struct node *next; } NODE, *LINK; void addNode(LINK head,
阅读全文
摘要:#include <stdio.h> int max(int a, int b); int min(int a, int b); int main(void) { int num, a, b, c; int t, maxNum, midNum, minNum; int big, small, i;
阅读全文
摘要:#include <stdio.h> int main(void) { int a, b, c; int max, mid, min; scanf("%d%d%d", &a, &b, &c); if (a > b) { if (a > c) { max = a; if (b > c) { mid =
阅读全文
摘要:这个题目的纯虚根问题搞的头大,其实没意思。 #include <stdio.h> #include <math.h> int main(void) { double a, b, c; scanf("%lf%lf%lf", &a, &b, &c); double delta = b * b - 4 *
阅读全文
摘要:1 #include <stdio.h> 2 #define N 5 3 struct Student { 4 char name[20]; 5 int num; 6 char sex; 7 int age; 8 char department[20]; 9 }; 10 void inputStud
阅读全文
摘要:1 #include <stdio.h> 2 #include <string.h> 3 char *process(char * s); 4 int main(void) 5 { 6 char str[200]; 7 //char str[200] = "Hello world.This is c
阅读全文
摘要:1 /* 2 QQ:778138708 3 date:2020年5月15日 4 单链表结点删除 5 */ 6 #include <stdio.h> 7 #include <stdlib.h> 8 9 struct ListNode { 10 int data; 11 struct ListNode
阅读全文
摘要:1 /* 2 QQ:7878138708 3 date:2020年5月16日 4 奇数值结点链表 5 */ 6 #include <stdio.h> 7 #include <stdlib.h> 8 9 struct ListNode { 10 int data; 11 struct ListNode
阅读全文