A439.*循环输出1 题解
2025-09-21 11:38:07
发布于:广东
4阅读
0回复
0点赞
用自定义函数来做这道题:
#include<bits/stdc++.h>
using namespace std;
void f(int x1, int x2) {
for (int i = x1; i <= x2; i++)
cout << i << endl;
}
int main() {
f(1, 100);
return 0;
}
这里空空如也
有帮助,赞一个