题解列表

筛选

素数判断--开方小于num

摘要:解题思路:注意事项:参考代码:#include <stdio.h>int isPrime(int num) {    if (num <= 1) {        return 0;    }    ……

fgets解决问题

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

1036题: 带参数宏定义练习

#代码难点对于宏定义,自己有点印象,但是不会运用,直接参考了答案,希望之后的代码可以照猫画虎#参考代码```c#include#include#definechang(a,b)t=a,a=b,b=t;intmain(){inta,b,t;scanf("%d%d",

[STL训练]周瑜的反间计

摘要:解题思路:利用寻找数组注意事项:用find,防止没有找到数字一直输出no参考代码:#include <stdio.h>int main() { int j,find,a,n,arr[1000]; lo……

1035题: 自定义函数之字符类型统计

#自己写的代码(稍有瑕疵,输出不在主函数中)```c#include#includeinttongji(chara[]){intz=0,s=0,k=0,q=0,l;l=strlen(a);for(inti=0;i'a'&&a[i]'A'&&a[i]'0'&&a[i]''){k=k+1;}else{q=

1033题: 自定义函数之字符提取

#自己写的代码```c#include#includevoidfun(a[]){charb[20];}intmain(){chara[20];intlen;len=strlen(a);gets(a);fun(a[]);return0;}```#思路局限性主要是不会从主函数中调用其他函数,

判断第几天

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

c语言代码解决问题

摘要:解题思路:注意事项:参考代码:#include<stdio.h>struct prut{    char MC[101];    double DJ;    int ML;};int main(){ ……

c语言代码解决问题

摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<stdlib.h>int maxmum(int x, int y){    return x > y ? x : y;……