解题思路:
注意事项:
参考代码:
#include<iostream> #include<cstdio> #include<string> using namespace std; int main() { int x; cin >> x; if (x < 1) { cout << x << endl; } else if (1 <= x && x < 10) { cout << 2 * x - 1; } else if (x >= 10) { cout << 3 * x - 11 << endl; } getchar(); getchar(); return 0; }
0.0分
0 人评分