之前搞过蓝桥杯,就从官网下载了Dev-cpp软件~
http://dasai.lanqiao.cn/pages/dasai/news_detail_w.html?id=1819

解压后,点击File – New – Project,直接F9编译F10运行:

#include <stdio.h>
int main(int arg ,char *argv[]) {
	int a = 0;
	scanf( "%d" , &a );
	printf( "a的值为 %d" , a ); 
	return 0;
}

C++的输入输出

#include <iostream> 
using namespace std;
int main()
{
	int a = 0;
	cin >> a;
	cout << "a的值为" << a <<endl;
	return 0;
}

Java的输入输出

import java.util.Scanner;
class ScannerTest{
	public static void main(String[] args){
		//实例化对象
		Scanner scan = new Scanner(System.in);
		//调用相关方法
		System.out.println("请输入a的值:");
		Int a = scan.nextInt();
		System.out.println(a);
		}
}

编译运行

编译 F9
运行 F10
编译运行 F11

调试

生成断点 ctrl+F5
开始调试 F8
执行当前行并跳到下一行 F7
跳到下一断点 crtl +F7
跳到光标位置 shift+F4
查看变量的值 F4

其他

设置注释 Ctrl+/ (取消注释Ctrl+/)
复制行 Ctrl+E
删除行 Ctrl+D
整体左移一个tab位置 shift+tab
整体右移一个tab位置 tab
整体代码缩进对齐 Ctrl+Shift+A

GitHub 加速计划 / de / Dev-Cpp
2.47 K
268
下载
A fast, portable, simple, and free C/C++ IDE
最近提交(Master分支:1 个月前 )
882c2376 Update language files 3 个月前
0c248ea0 Lang=Japanese (日本語) // Please see issue Embarcadero#297 Same number of items as English.lng. 3 个月前
Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐