C++ 代码
#include <iostream>
#include <stdio.h>
using namespace std;
int main() {
int a[1500];
int x, n = 0;
for (; ;) {
cin>>x;
a[n = n+1] = x;
}
for (; n >= 1; n = n-1) {
cout<<a[n]<<" ";
}
}
#include <iostream>
using namespace std;
int main() {
//freopen("Input.txt", "r", stdin);
//freopen("Output.txt", "w", stdout);
for (int m = 1; m = m + 1;) {
int input;
cin>>input;
if (input == 0) {
break;
}
int s = 0;
for (int n = 2; n <= input - 1; n = n + 1) {
if (input % n == 0) {
break;
} else {
s = s + 1;
}
if (s >= input - 2) {
cout<<input<<" ";
break;
}
}
}
cout<<endl;
}
#include <stdio.h>
using namespace std;
int main() {
int a[1500];
int x, n = 0;
for (; ;) {
cin>>x;
a[n = n+1] = x;
}
for (; n >= 1; n = n-1) {
cout<<a[n]<<" ";
}
}
#include <iostream>
using namespace std;
int main() {
//freopen("Input.txt", "r", stdin);
//freopen("Output.txt", "w", stdout);
for (int m = 1; m = m + 1;) {
int input;
cin>>input;
if (input == 0) {
break;
}
int s = 0;
for (int n = 2; n <= input - 1; n = n + 1) {
if (input % n == 0) {
break;
} else {
s = s + 1;
}
if (s >= input - 2) {
cout<<input<<" ";
break;
}
}
}
cout<<endl;
}
上一篇:Apogee Company
下一篇:极简宇宙史
声明:以上文章均为用户自行添加,仅供打字交流使用,不代表本站观点,本站不承担任何法律责任,特此声明!如果有侵犯到您的权利,请及时联系我们删除。
文章热度:☆☆☆☆☆
文章难度:☆☆☆☆☆
文章质量:☆☆☆☆☆
说明:系统根据文章的热度、难度、质量自动认证,已认证的文章将参与打字排名!
本文打字排名TOP20
登录后可见