简单C语言训练-数字母 摘要:```python s=input() c=0 for i in s: if i.isalpha(): //isalpha寻找字母 c+=1 print(c) …… 题解列表 2023年11月15日 0 点赞 0 评论 245 浏览 评分:0.0
C语言训练-自由落体问题 摘要:解题思路:注意事项:参考代码:#include <stdio.h> #include <math.h> int main() { int n; scanf("%d", &n…… 题解列表 2023年11月15日 0 点赞 0 评论 235 浏览 评分:0.0
编写题解 1202: 多输入输出练习1(非常简单的方法一看就懂) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int a,max=0; while(scanf("%d",&a)==1) { if(a>max) m…… 题解列表 2023年11月15日 0 点赞 0 评论 244 浏览 评分:0.0
粗俗易懂,新手都能会 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int a[10],x; for(int i=0;i<=8;i++) scanf("%d\n",&a[i]); …… 题解列表 2023年11月15日 0 点赞 0 评论 219 浏览 评分:0.0
粗俗易懂,新手都能会 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int a[10],t; for(int i=0;i<=9;i++) scanf("%d",&a[i]); fo…… 题解列表 2023年11月15日 0 点赞 0 评论 186 浏览 评分:0.0
C语言:用指针解 摘要:解题思路:因为字符串无法直接赋值,所以利用指针切换地址即可参考代码:#include <stdio.h>#include <string.h>int main() { char str1[100…… 题解列表 2023年11月16日 0 点赞 0 评论 180 浏览 评分:0.0
C语言训练-计算一个整数N的阶乘 摘要:解题思路:注意事项:参考代码 #include<stdio.h>int main(){ int n,i,z=1; scanf("%d",&i); for(n=1;n<=i;n++){ z=z*n; …… 题解列表 2023年11月16日 0 点赞 0 评论 137 浏览 评分:0.0
通过数组标记 摘要:解题思路:用数组给每个人标号,将每次循环报3的人赋值0,直到只剩1个找到它的标号。参考代码:#include <stdio.h>// 函数pan用于找出最后剩下的一个元素int pan(int *a,…… 题解列表 2023年11月16日 0 点赞 0 评论 175 浏览 评分:0.0
明明的随机数(记得考虑多个相同的数连在一起的情况) 摘要:参考代码: ```c #include int main() { int n; scanf("%d",&n); int a[n]; for(int i=0;i…… 题解列表 2023年11月16日 0 点赞 0 评论 194 浏览 评分:0.0
C语言训练-最大数问题(易错点在于给max的初值,如果给max赋0的话,但给的数全是负数,0不在给的数之中,但是最后max会是0,只能先把给的第一个数赋给max) 摘要:解题思路:注意事项:参考代码:#include<stdio.h> int main() { int a,max; scanf("%d",&a); max=a; while(~sca…… 题解列表 2023年11月16日 0 点赞 0 评论 222 浏览 评分:0.0