题解列表

筛选

自定义函数之字符串反转

摘要:解题思路:这段代码中的mystrrev函数用于反转输入的字符串。在这个函数中,参数ch1被当作字符数组的指针来处理。当数组作为参数传递给函数时,实际上传递的是数组的地址,也就是指向数组第一个元素的指针……

c语言新手想哥德巴赫致敬

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int a,i=2,j=2,x=1,y=1,k,sum=0; scanf("%d",&a); for(i=2;i……

自定义函数之字符串反转

摘要:解题思路:b[i] = a[len - i - 1]注意事项:strlen()函数(统计字符串长度)要有头文件#include <string.h>参考代码:#include <stdio.h>#in……

救援(java代码)

摘要:解题思路:注意事项: Math.sqrt()方法用于求算术平方根  Math.ceil()向上取整 扩展: Math.round()四舍五人的整数  Math.floor()向下取整参考代码:impo……

鸡尾酒疗法(java代码)

摘要:解题思路:注意事项:参考代码:import java.util.Scanner;public class Main {    public static void main(String[] args……

与圆相关的计算

摘要:解题思路:注意事项:不能用“cin”和“cout”,用了就会报错。参考代码:#include<iostream>using namespace std;int main(){   double r; ……

题解 2801: 奇数求和

摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ int a,b,c=0,d; cin>>a>>b; if(a……

题解 2805: 乘方计算

摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ int z,f=0,b,c=0; cin>>b>>z; f=……