📄 testconsole.cpp
字号:
// TestConsole.cpp : Defines the entry point for the console application.
//该程序在控制台进行输入和输出
#include "stdafx.h"
#include "iostream.h" //包含使用cout对象必须的头文件
#include "stdio.h" //使用printf和scanf函数的头文件
int main(int argc, char* argv[])
{
int x,y;
printf("输入两个整数:");
scanf("%d %d",&x,&y);
printf("%d+%d=%d\n",x,y,x+y);
cout<<"输入x:";
cin>>x;
cout<<"输入y:";
cin>>y;
cout<<"x+y="<<(x+y)<<"\n";
return 1;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -