标题:求#define祥解
取消只看楼主
afraidhlq
Rank: 1
来 自:重庆市
等 级:新手上路
帖 子:20
专家分:0
注 册:2008-3-16
 问题点数:0 回复次数:1 
求#define祥解
#include<iostream.h>
#define PI 3.1415926
#define FUDGE(R) R+PI
#define PR(a) cout<<"a="<<int(a)<<"\t";
#define PRINT(a) PR(a);cout<<"\n";
#define PRINT2(a,b) PR(a);PRINT(b)
#define PRINT3(a,b,c) PR(a);PRINT(b,c)
#define MAX(a,b) (a<b?b:a)
void main()
{
  {
    int x=2;
    PRINT(x*FUDGE(2));
   }
  {
    for(int cel=0; cel<=100;cel+=50)
    PRINT2(cel,15*cel+32);
  }
  {
   int x=1, y=2;
   PRINT3(MAX(x++,y),x,y);
   PRINT3(MAX(x++,y),x,y);
  }
}
搜索更多相关主题的帖子: define 
2008-03-19 23:59
afraidhlq
Rank: 1
来 自:重庆市
等 级:新手上路
帖 子:20
专家分:0
注 册:2008-3-16
得分:0 
谢谢,不过那程序我又 对照了一启遍
和书一个符号不差,
我抄下来的
书上有;

[fly]我要考软件工程师[/fly]
[red]别笑!![/red]
2008-03-21 16:24



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-204307-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.182265 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved