文档下载 文档下载导航
设为首页 | 加入收藏
搜索 请输入内容:  
 导航当前位置: 文档下载 > 所有分类 > 高等教育 > 理学 > C++ Primer Plus 第六版 第七章编程题答案
侵权投诉

C++ Primer Plus 第六版 第七章编程题答案

C++ Primer Plus 第六版 第七章编程题答案

//7.13.10

#include<iostream>

double add(double x,double y);

double subtraction(double x,double y);

double calculate(double x,double y ,double (*ps)(double a ,double b));

int main()

{

}

double add(double x,double y)

{

}

double subtraction(double x,double y)

{

}

double calculate(double x,double y,double (*ps)(double,double)) {

double a; a = (*ps)(x,y); return a; return x-y; return x+y; using namespace std; cout << "Please enter two number: \n"; double x,y; cin >> x >>y ; if(cin) { } return 0; double result_add,result_subtraction; result_add = calculate(x,y,add); result_subtraction = calculate(x,y,subtraction); cout << "The sum of "<< x << " and "<< y << "is " << result_add<<endl; cout << "The subtraction of " << x << " and "<< "is " << result_subtraction << endl; cout << "Enter a number: "; cin >> x; cout << "Enter another number: "; cin >> y;

第1页

你可能喜欢

  • 版课后习题答案visual
  • 编程题答案shell
  • 模拟题答案cisp
  • visualbasic版课后习题答案
  • visual basic程序设计复习题答案

热门文档

相关文档

站点地图 | 文档上传 | 侵权投诉 | 手机版
本站所有资源均来自互联网,本站只负责收集和整理,均不承担任何法律责任,如有侵权等其它行为请联系我们.
文档下载 Copyright 2013 doc.guandang.net All Rights Reserved.  -  email