编程题
来源:互联网 发布:ugui源码调试 编辑:程序博客网 时间:2024/05/16 00:35
#include <iostream>using namespace std;class Tast{ public: void init(int a,int b); void print(); private: int x; int y;};void Tast::init(int a,int b) { x=a; y=b; }void Tast::print() { int y1,z; z=x-y; y1=-y; cout<<x<<((y>0)?'-':'+')<<(y>0?y:y1)<<'='<<z<<endl; }int main(){ Tast a; a.init(68,55); a.print(); return 0;}
运行结果:
- 编程题
- 编程题
- 编程题?
- 编程题
- 编程题
- 编程题
- 编程题
- 编程题
- 编程题
- 编程题
- 编程题
- 编程题
- 编程题
- 编程题
- 编程题
- 编程题
- 编程题
- 编程题
- error LNK2005 问题
- c++简单函数使用备忘
- UINavigationController和UINavigationControllerDelegate
- Android网络编程
- android 电话状态监听器
- 编程题
- linux chmod 作用
- msado15.dll 使用心得
- FileHelper
- IOS开发之设置 NSZombieEnable 定位EXC_BAD_ACCESS错误
- 获取 iOS 设备当前 ip 地址
- 构建JWFD开源工作流的SDK开发包-来自朋友们的建议(6.17更新)
- ios学习笔记(三)之内存管理
- mysql各存储引擎之间的区别