1.输入显示器尺寸和最佳分辨率,算出显示器的宽度和高度。
#include <stdio.h>
#include <iostream>
//#include <iomanip>
using namespace std;
struct Resolution
{
double width;
double hight;
};
struct MonitorSize
{
double width;
double hight;
};
int main()
{
//输入monitor 分辨率//得到monitor 宽高比
//输入monior 尺寸//再把其换算成mm单位
Resolution MonitorReso;
MonitorSize Monitor;
double MonitorInches{
0 };
double MonitorMM{
0 }, MonitorCM{
0};
double x{
0 };
int Width{
0 }, Height