📄 main.cpp
字号:
#include "head.h"
void main(void)
{
Computer mycomputer;
int totlevalue = 0;
mycomputer.SetCpuFrequency();
mycomputer.SetCpuManufacturer();
mycomputer.SetMemoySize();
mycomputer.SetMemoyFacturer();
mycomputer.SetMonitorSize();
mycomputer.SetMonitorType();
mycomputer.SetMonitorFacturer();
mycomputer.SetMainBoardFacturer();
totlevalue += mycomputer.GetMemoyValue();
totlevalue += mycomputer.GetCpuValue();
totlevalue += mycomputer.GetMainBoardValue();
totlevalue += mycomputer.GetMonitorValue();
cout<<"整机价格为:"<<totlevalue<<endl;
cout<<"这台电脑的配置为:"<<endl;
cout<<"CPU: ";
if( mycomputer.GetCpuManufacturer() == 1 )
{
cout<<"龙芯"<<endl;
}
if( mycomputer.GetCpuManufacturer() == 2 )
{
cout<<"AMD"<<endl;
}
if( mycomputer.GetCpuManufacturer() == 3 )
{
cout<<"英特尔"<<endl;
}
cout<<"内存: ";
if( mycomputer.GetMemoyFacturer() == 1 )
{
cout<<"金士刚"<<endl;
}
if( mycomputer.GetMemoyFacturer() == 2 )
{
cout<<"宇瞻"<<endl;
}
if( mycomputer.GetMemoyFacturer() == 3 )
{
cout<<"金士顿"<<endl;
}
cout<<"主板: ";
if( mycomputer.GetMainBoardFacturer() == 1 )
{
cout<<"双敏"<<endl;
}
if( mycomputer.GetMainBoardFacturer() == 2 )
{
cout<<"华硕"<<endl;
}
if( mycomputer.GetMainBoardFacturer() == 3 )
{
cout<<"英特尔"<<endl;
}
cout<<"显示器: ";
if( mycomputer.GetMonitorFacturer() == 1 )
{
cout<<"爱国者"<<endl;
}
if( mycomputer.GetMonitorFacturer() == 2 )
{
cout<<"LG"<<endl;
}
if( mycomputer.GetMonitorFacturer() == 3 )
{
cout<<"飞利浦"<<endl;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -