#include <stdio.h> const int N=3; int main() { int a[N] = {1, 2, 3}; int i; printf("通过数组名和下标直接访问数组元素:\n"); for(i=0; i<N; i++) printf("%d: %d\n", &a[i] ...
分类:
其他好文 时间:
2021-06-02 13:29:18
阅读次数:
0
1、 #include <stdio.h> int str_char(char x[], int key) { int len = 0; while(x[len]) len++; int i; for(i = 0; i < len; i++) { if(x[i] == key) return i; ...
分类:
编程语言 时间:
2021-06-02 12:49:19
阅读次数:
0
1、 #include <stdio.h> #define NUMBER 5 int main(void) { char str[NUMBER][128]; int i; for(i = 0; i < NUMBER; i++) { printf("str[%d] = ", i); scanf("%s ...
分类:
编程语言 时间:
2021-06-02 12:43:03
阅读次数:
0
#include <stdio.h> #include <stdlib.h> #include <time.h> #define max(a, b) ((a) > (b) ? (a) : (b)) typedef struct Node { int key, height; struct Node ...
分类:
其他好文 时间:
2021-06-02 12:24:05
阅读次数:
0
任务一#include <stdio.h> const int N=3; int main() { int a[N] = {1, 2, 3}; int i; printf("通过数组名和下标直接访问数组元素:\n"); for(i=0; i<N; i++) printf("%d: %d\n", &a ...
分类:
其他好文 时间:
2021-06-02 12:17:51
阅读次数:
0
#include <stdio.h> const int N=3; int main() { int a[N] = {1, 2, 3}; int i; printf("通过数组名和下标直接访问数组元素:\n"); for(i=0; i<N; i++) printf("%d: %d\n", &a[i] ...
分类:
其他好文 时间:
2021-06-02 12:09:15
阅读次数:
0
#include <stdio.h> const int N=3; int main() { int a[N] = {1, 2, 3}; int i; printf("通过数组名和下标直接访问数组元素:\n"); for(i=0; i<N; i++) printf("%d: %d\n", &a[i] ...
分类:
其他好文 时间:
2021-06-02 12:07:29
阅读次数:
0
c语言中统计字符串中数字字符出现的次数。 1、 #include <stdio.h> void int_count(char x[], int cnt[]) { int i; while(x[i]) { if(x[i] >= '0' && x[i] <= '9') { cnt[x[i] - '0'] ...
分类:
编程语言 时间:
2021-06-02 11:38:03
阅读次数:
0
任务描述 有一个长度为n(n <= 240)的正整数,从中取出s(s < n)个数,使剩余的数保持原来的次序不变,求这个正整数经过删数之后最小是多少。 输入格式 第一行输入n和s 输出格式 输出一个整数 输入样例 178543 4 输出样例 13 1 #include<stdio.h> 2 #inc ...
分类:
其他好文 时间:
2021-06-02 11:25:02
阅读次数:
0
c语言中使用putchar显示字符串 1、 #include <stdio.h> int put(char x[]) { int i = 0; while(x[i]) putchar(x[i++]); } int main(void) { char str[128]; printf("str: ") ...
分类:
编程语言 时间:
2021-06-02 11:15:10
阅读次数:
0