This commit is contained in:
2026-03-03 13:25:15 +08:00
parent 109ed8def8
commit a84489c5de
2 changed files with 46 additions and 0 deletions

21
if逻辑判断语句.cpp Normal file
View File

@@ -0,0 +1,21 @@
//
// Created by violet on 2026/3/3.
//
#include "iostream"
using namespace std;
int main() {
/*
* if{}
*/
cout<<"今天发工资了"<<endl;
int money;
cout<<"请输入小明发的工资"<<endl;
cin>>money;
if (money>=10000) {
cout<<"小明去买电脑了"<<endl;
money -= 9900;
}
cout<<"小明工资还剩"<<money<<endl;
return 0;
}