Files
learn_cpp/if逻辑判断语句.cpp

22 lines
403 B
C++
Raw Permalink Normal View History

2026-03-03 13:25:15 +08:00
//
// 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;
}