题解列表

筛选

字符串对比 (C语言代码)

摘要:解题思路:注意事项:参考代码:#include <stdio.h>#include <ctype.h>#include <string.h>int main(){    char ar[11];   ……

最长单词 (C语言代码)

摘要:解题思路:在解这个题之前我曾经接触过一个统计单词的题。从那个题得到了灵感,通过标志位判断是否为一个单词,同时进行字母计数。注意事项:参考代码:#include <stdio.h>#include <c……

【亲和数】 (C语言代码)

摘要:解题思路:输入m为行数,a和b为判定的的值,sum1和sum2分别统计a和b的约数和,求a和b的约数时其约数只能在1<=i<=a/2,1<=j<=b/2,此为循环判断的条件注意事项:语句:  if((……

ASCII帮了大忙

摘要:解题思路:1.将输入以字符串方式读取2.通过ASCII判断除了"."的每一个字符是否在0-9之间。注意事项:进行数字运算时要将字符型强制转换为整型。参考代码:#include <stdio.h>#in……

字符串问题 (C语言代码)

摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>int main(){    char str[300];    int i;    while(g……

最小公倍数 (C语言代码)

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){    int a,b,i;    while(scanf("%d%d",&a,&b)!=EOF)    {   ……

大小写转换 (C语言代码)

摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>int main(){    char str[100];    int i;    while(g……

上车人数 (C语言代码)

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int add(int a,int n,int Y){    if(n==1) return a;    else if(n==2) r……

回文数(一) (C语言代码)

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int f(int n);int fx(int n);int main(){    int M,L,count;    scanf("%……