123
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Bucket
|
||||
uuid = "3224733E-16AC-4D1B-89D1-0C06F06AB765"
|
||||
type = "1"
|
||||
version = "2.0">
|
||||
</Bucket>
|
||||
@@ -1,14 +1,17 @@
|
||||
//
|
||||
// main.cpp
|
||||
// test01
|
||||
//
|
||||
// Created by Leo on 2025/6/21.
|
||||
//
|
||||
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
int main(int argc, const char * argv[]) {
|
||||
// insert code here...
|
||||
std::cout << "Hello, World!\n";
|
||||
return 0;
|
||||
int main() {
|
||||
/*
|
||||
要求:编写程序,输出 1-50 之间所有能被 3 整除的数字,并统计其个数
|
||||
*/
|
||||
int count = 0;
|
||||
for (int i = 1; i <= 50; i++) {
|
||||
if (i % 3 == 0) {
|
||||
cout << i << " ";
|
||||
count++;
|
||||
}
|
||||
}
|
||||
cout << endl;
|
||||
cout << count << endl;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user