⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ezwin.cpp

📁 清华关于C++ 的程序讲义 值得一看 关于算法
💻 CPP
字号:
// Program 3.5: Compute the time and cost required to mow
// a lawn
#include <iostream>
#include <string>
#include <rect.h>
using namespace std;
int ApiMain() {
	const int Width = 8;
	const int Height = 7;
	int LawnLength = 6;
	int LawnWidth = 5;
	int HouseLength = 3;
	int HouseWidth = 2;

	SimpleWindow Window("A Simple Window Demo",
	                    Width, Height);
	Window.Open();

	RectangleShape Lawn(Window, Width/2.0, Height/2.0,
	                    Green, LawnLength, LawnWidth);
	Lawn.Draw();

	RectangleShape House(Window, Width/2.0, Height/2.0,
	                     Yellow, HouseLength, HouseWidth);
	House.Draw();
	
	cout << "Type a character followed by a\n"
	 << "return to remove the window and exit" << endl;
	char AnyChar;
	cin >> AnyChar;
	Window.Close();
	
	return 0;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -