题解列表

筛选

1139求素数问题

摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int n; cin >> n; int k = 2;//1 不是素数……

1137求函数值

摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int a = 10; int n; cin >> n; if (n ……

1134求PI*(while循环)

摘要:解题思路:注意事项:答案是3.141591参考代码:#include<iostream>using namespace std;int main(){ double a = 1.0;//这是分子 do……

不同单词个数统计(C语言):边读取单词边判断

摘要:解题思路:边读取单词边判断是否为新单词。若是则存储起来并且count+1,否则就忽略。注意事项:数组大小不妨定的大一些,以免不够用。循环中有中间变量时,记得更新变量的值。参考代码:#include<s……