不语的誓言
不语的誓言
全部文章
题解
错题笔记(1)
归档
标签
去牛客网
登录
/
注册
不语的誓言
每天一小步
全部文章
/ 题解
(共7篇)
题解 | #找出字符串中第一个只出现一次的字符#
将字符放入对应角标的数组位置,如果有重复的该位置数字加一,之后判断其值就可找到第一次出现的字符。 #include<stdio.h> #include<string.h> int main() { char a[10000]={0}; while(scanf(...
2021-08-30
1
315
题解 | #高精度整数加法#
程序写复杂了,但也是过了,嘿嘿有简单可以给解说一下 #include<stdio.h> #include<string.h> int main() { char n[10000]={0},m[...
2021-08-29
0
234
题解 | #记负均正#
首先输入要输入的整数个数n,然后输入n个整数。输出为n个整数中负数的个数,和所有正整数的平均值,结果保留一位小数。0即不是正整数,也不是负数,不计入计算思路:先输入一个整数个数,然后在循环内在输入所要输入的值,将值一个一个输入,通过两个Scanf之后就会又回到输入整数n语句。#include<...
2021-08-16
0
332
题解 | #统计大写字母个数#
找出给定字符串中大写字符(即'A'-'Z')的个数。#include<stdio.h>int main(){ char s[1000]; int i,k=0,len; while(gets(s)) { len=strlen(s); fo...
2021-08-11
1
316
题解 | #参数解析#
在命令行输入如下命令: xcopy /s c:\ d:\, 各个参数如下: 参数1:命令字xcopy 参数2:字符串/s 参数3:字符串c:\ 参数4: 字符串d:\ include<stdio.h> include<string.h> int main(){ int ...
2021-08-06
0
279
题解 | #查找输入整数二进制中1的个数#
输入一个正整数,计算它在二进制下的1的个数。注意多组输入输出!!!!!!#include<stdio.h>int main(){ int x,num=0; while (scanf("%d",&x)!=EOF) { while(...
2021-08-02
1
349
题解 | #完全数计算#
include <stdio.h> int main(){ int i,j,k=0,n; while(scanf("%d",&n)!=EOF) { int num=0; for(j=2;j&...
2021-07-31
1
381