📄 0812009_chitietmay.cpp
字号:
// 0812009_ChiTietMay.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include "May.h"
#include "iostream"
using namespace std;
void main()
{
CMay M;
M.Nhap ();
long maso;
cout << "\nNhap ma so chi tiet can tim kieu: ";
cin >> maso;
int kieu = M.TimKieu (maso);
switch(kieu)
{
case 0:
cout << "Chi tiet can tim la chi tiet don." << endl;
break;
case 1:
cout << "Chi tiet can tim la chi tiet phuc." << endl;
break;
case -1:
cout << "Khong tim thay chi tiet." << endl;
}
float giatien;
cout << "\nNhap ma so chi tiet can tinh tien: ";
cin >> maso;
if(M.TimKiem(maso) != NULL)
{
giatien = M.TinhTien(maso);
cout << "Chi tiet can tim co gia: " << giatien << endl;
}
else
cout << "Khong tim thay chi tiet." << endl;
giatien = M.TinhTien ();
cout << "\nTong tien cua may: " << giatien << endl;
M.Xuat ();
int dem=M.DemChiTietDon ();
cout << "\nSo chi tiet don co trong may la: " << dem << "\n\n";
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -