save code

This commit is contained in:
xsl
2026-05-16 11:09:02 +08:00
parent 478b3451a1
commit a169ceb263
45 changed files with 2226 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
#include <iostream>
#include <cstdlib>
#include <ctime>
int main() {
std::srand(std::time(nullptr));
int r =std::rand() % 101;
std::cout << " 随机数 " << r << "\n";
if ( r < 70)
{
std::cout << " 普通卡 " << "\n";
}
else if (r < 95)
{
std::cout << " 稀有卡" << "\n";
}
else
{
std::cout << " 传说卡 " << "\n";
}
return 0;
}