page160
来源:互联网 发布:python 2.7.11 编辑:程序博客网 时间:2024/05/16 09:49
// page160.cpp : 定义控制台应用程序的入口点。
//C++ 面向对象程序设计
//律师事务所计费程序
#include "stdafx.h"
#include <iostream>
using namespace std ;
const double RATE = 150.00; //每刻钟收费的金额
double fee(int hours_worked , int minutes_worked);
//返回hours_worked小时又minutes_worked分钟的法律服务费
int _tmain(int argc, _TCHAR* argv[])
{
int hours , minutes ;
double bill;
cout << " welcome to the offices of \n"
<< " Dewey , Cheatham , and Howe .\n "
<< " The law office with a heart .\n "
<< " Enter the hours and minutes "
<< " of your consultation:\n";
cin >> hours >> minutes;
bill = fee (hours, minutes);
cout.setf(ios::fixed);
cout.setf(ios::showpoint);
cout.precision(2);
cout << " FOr " << hours << " hours and " << minutes
<< " minutes , your bill is $ " << bill << endl ;
cin >> hours;
return 0;
}
double fee(int hours_worked , int minutes_worked)
{
int quarter_hours;
minutes_worked = hours_worked*60 + minutes_worked;
quarter_hours = minutes_worked/15;
return (quarter_hours * RATE);
}
- page160
- 深入浅出C# 中文版 图文皆译 第四章 类型和引用 page160
- 某书——数据访问技术的发展,以及ado.net
- Java文件读写操作大全
- html总结概要
- HTML中引号多层嵌套的问题
- VB代码:监控系统鼠标指针的变化
- page160
- Tomcat服务器自动加载监听程序
- 这当爹的太霸道了!写给未来儿子的信【爆笑】【欢迎转载】 - Qzone日志
- 如何制作.url文件
- 从Java中String的subString函数说起
- Linux下 /proc/maps 文件分析(转)
- 如何成为软件工程师! 菜鸟 的一些感悟!如有雷同,不甚荣幸! 菜鸟起航
- canny算法
- STL:accumulate与自定义数据类型