Files
learn_cpp/if逻辑判断语句.cpp
2026-03-03 13:25:15 +08:00

22 lines
403 B
C++
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
//
// 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;
}