摘要: 1、sort函数可以三个参数也可以两个参数,必须的头文件#include < algorithm>和using namespace std; 2、Sort函数有三个参数:(第三个参数可不写) (1)第一个是要排序的数组的起始地址。 (2)第二个是结束的地址(最后一位要排序的地址)。 (3)第三个参数 阅读全文
posted @ 2019-06-19 22:39 寂寞致幻 阅读(425) 评论(0) 推荐(0) 编辑
摘要: #include #include using namespace std; int main() { string a; int b; stringstream c; cin.getline(a); c>b; cout<<b<<endl; cout<<b+1<<endl; return 0; } 阅读全文
posted @ 2019-06-19 22:22 寂寞致幻 阅读(470) 评论(0) 推荐(0) 编辑
摘要: #include #include using namespace std; int main() { string a; getline(cin,a); reverse(a.begin(),a.end()); cout<<a; return 0; } 阅读全文
posted @ 2019-06-19 22:19 寂寞致幻 阅读(6018) 评论(0) 推荐(0) 编辑
摘要: #include using namespace std; void isprime(int a) { int s=a; int b=0; bool x=true; while(s>0) { b=b*10+s%10; s=s/10; } for(int j=2;j>a; isprime(a); ... 阅读全文
posted @ 2019-06-19 21:58 寂寞致幻 阅读(620) 评论(0) 推荐(0) 编辑