定义数组时下标为变量导致错误 摘要:注意事项:定义数组时下标不能为未知的变量:第一遍写的代码将a[n][n]定义在对n取值之前,答案出现问题。因为在定义数组时下标不能为未知的变量,因为在本题中是在全局定义中定义了数组,而编译器在编译时会…… 题解列表 2021年03月01日 0 点赞 0 评论 911 浏览 评分:0.0
1048: [编程入门]自定义函数之字符串拷贝 摘要:解题思路:注意事项:参考代码:#include <stdio.h>#define LEN 100int main(){ char str[LEN]={'\0'},result[LEN]…… 题解列表 2021年03月01日 0 点赞 0 评论 354 浏览 评分:0.0
Hello World! 摘要:#include <stdio.h>void main(){ printf("**************************\n"); printf("Hello World!\n"…… 题解列表 2021年03月01日 0 点赞 0 评论 401 浏览 评分:0.0
1049: [编程入门]结构体之时间设计 摘要:解题思路:注意事项:参考代码:#include <stdio.h>typedef struct date{ int year,month,day;}D;int main(){ D d; int tot…… 题解列表 2021年03月01日 0 点赞 0 评论 688 浏览 评分:0.0
求平方和 c语言 摘要:解题思路:没有啥思路用手就行。注意事项:注意学好数学反复复习不然你还要去百度差真丢脸。参考代码:#include<stdio.h>int main(){ int a,b,c; scanf("%d%d"…… 题解列表 2021年03月01日 0 点赞 0 评论 666 浏览 评分:0.0
1050: [编程入门]结构体之成绩记录 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#define LEN 100 //最大长度 typedef struct stu { char id[10]; char name[…… 题解列表 2021年03月01日 0 点赞 0 评论 398 浏览 评分:0.0
1051: [编程入门]结构体之成绩统计2 摘要:解题思路:注意事项:参考代码:#include <stdio.h>#define LEN 100 //最大数量 typedef struct stu { char id[10]; char name…… 题解列表 2021年03月01日 0 点赞 0 评论 596 浏览 评分:0.0
1053: 二级C语言-平均值计算 摘要:解题思路:注意事项:参考代码:#include <stdio.h>#define LEN 10int main(){ int arr[LEN]; int num=0; //大于平均数的个数 floa…… 题解列表 2021年03月01日 0 点赞 0 评论 367 浏览 评分:0.0
1085: A+B for Input-Output Practice (I) 摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main(){ int a,b; while(scanf("%d%d",&a,&b)==2) printf("%d\n",a…… 题解列表 2021年03月01日 0 点赞 0 评论 508 浏览 评分:0.0
1086: A+B for Input-Output Practice (II) 摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main(){ int n;//数组行数 int arr[n][2]; int sum[n]; scanf("%d",&n)…… 题解列表 2021年03月01日 0 点赞 0 评论 621 浏览 评分:0.0