mirror of
http://106.12.3.193:3000/violeteverisland/learn_cpp.git
synced 2026-03-08 01:27:33 +08:00
12
This commit is contained in:
22
cin数据输入.cpp
22
cin数据输入.cpp
@@ -2,9 +2,25 @@
|
||||
// Created by viole on 2026/2/25.
|
||||
//
|
||||
#include <iostream>
|
||||
#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 << "请输入你的姓名:" <<endl;
|
||||
cin >> name;
|
||||
|
||||
cout << "请输入你的身高(cm):" <<endl;
|
||||
cin >> height;
|
||||
|
||||
cout << "请输入你的年龄:" <<endl;
|
||||
cin >> age;
|
||||
cout << "--------"<<endl;
|
||||
cout << "信息输入完成,您的信息如下:"<<endl;
|
||||
cout<<"姓名:"<<name<<endl;
|
||||
cout<<"身高:"<<height<<endl;
|
||||
cout<<"年龄:"<<age<<endl;
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user