From c03026824fe2815a45f20343c77b45d2a5604e05 Mon Sep 17 00:00:00 2001 From: violeteverisland Date: Sat, 28 Feb 2026 17:05:12 +0800 Subject: [PATCH] 12 --- cin数据输入.cpp | 22 +++++++++++++++++++--- 比较运算符.cpp | 13 +++++++++++++ 算数运算符.cpp | 19 +++++++++++++++++++ 赋值运算符.cpp | 23 +++++++++++++++++++++++ 4 files changed, 74 insertions(+), 3 deletions(-) create mode 100644 比较运算符.cpp create mode 100644 算数运算符.cpp create mode 100644 赋值运算符.cpp diff --git a/cin数据输入.cpp b/cin数据输入.cpp index cfb7789..c4b1b17 100644 --- a/cin数据输入.cpp +++ b/cin数据输入.cpp @@ -2,9 +2,25 @@ // Created by viole on 2026/2/25. // #include +#include "windows.h" using namespace std; int main() { - int num ; - cin >> num; - cout << num << endl; + SetConsoleOutputCP(CP_UTF8); + string name; + double height; + int age; + cout << "请输入你的姓名:" <> name; + + cout << "请输入你的身高(cm):" <> height; + + cout << "请输入你的年龄:" <> age; + cout << "--------"<大于 <小于 <=小于等于>=大于等于 + int num1 =3; + int num2 =4; + bool r1 = (num1!=num2); + cout<