交换 a b 的值(不增加新的变量) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int a,b; scanf("%d%d", &a, &b); a=a^b; b=a^b…… 题解列表 2023年02月05日 0 点赞 0 评论 644 浏览 评分:0.0
向量点积计算(建立结构体) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>struct xy{ int a; int b;}spot[1000];int main(){ int n,sum=0; scanf("…… 题解列表 2023年02月05日 0 点赞 0 评论 535 浏览 评分:0.0
找第一个只出现一次的字符(代码简短) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int i,count[26]={0}; char str[100000]; gets(str); f…… 题解列表 2023年02月05日 0 点赞 0 评论 526 浏览 评分:0.0
暴力算法c语言 普通的for循环#includeintisPrime(intn){inti;intt=sqrt(n);for(i=2;i 题解列表 2023年02月05日 0 点赞 0 评论 521 浏览 评分:9.9
<函数>分段函数求值(C语言) 摘要:#include<stdio.h> int Fun(int x) { int y = 0; if (x < 1) { y = x; } else if (x >= 1 &…… 题解列表 2023年02月04日 0 点赞 0 评论 517 浏览 评分:0.0
选择排序法 摘要:解题思路:一共输入十个数,用数组进行保存,再进行选择排序;注意事项:参考代码:#include<stdio.h>int main(){ int a[10],i,j,t; for(i=0;i…… 题解列表 2023年02月04日 0 点赞 0 评论 634 浏览 评分:9.9
字符串p型编码+遍历思想 摘要:解题思路:利用遍历的思想,将一位数与后面的数进行比较,当遇到不同的数时,停止记数,并进行输出,在跳过累加的数,进行下一个数的记数。注意事项:参考代码:#include<stdio.h>#include…… 题解列表 2023年02月04日 0 点赞 0 评论 578 浏览 评分:0.0
连续出现的字符 摘要:解题思路:利用排序法的思路,进行遍历比较注意事项:参考代码:#include<stdio.h>#include<string.h>int main(){ int k;char str[1000]; s…… 题解列表 2023年02月04日 0 点赞 0 评论 754 浏览 评分:9.9
密码(简单易解) ```c#include#includeintmain(){intn,i,j,cnt,flag1,flag2,flag3,flag4;chars[100];scanf("%d",&n);for(i=0;i='A'&&s[j]='a'&&s[j]='0'&&s[j]=8&&cnt=3){printf(" 题解列表 2023年02月04日 0 点赞 0 评论 588 浏览 评分:9.9
一个数组位操作实现转置 摘要:#include<stdio.h> static x = 0; int main() { int arr[3][3]; int i = 0, j = 0; for …… 题解列表 2023年02月04日 0 点赞 0 评论 392 浏览 评分:0.0