摘要:
#include<iostream> using namespace std; int main() { int arr[10] = {}; cout << "请输入十个数组元素" << endl; for (int i = 0; i < 10; i++) { cout << "第" << i + 阅读全文
摘要:
#include <iostream> using namespace std; #include <cmath> int main() { int x = 0; cout << "请输入一个正整数:" << endl; cin >> x; int m = x; int z = x; for (in 阅读全文
摘要:
#include <iostream>using namespace std;void bubbleSort(int* arr, int len) { for (int i = 0; i < len - 1; i++) { for (int j = 0; j < len - i - 1; j++) 阅读全文
摘要:
编程打印1到150以内能被3整除的自然数的和 #include <iostream> using namespace std; int main() { int x = 1; int z = 0; do { if (x >= 3) { if (x % 3 == 0) { z = z + x; } } 阅读全文