主题:vs
#include<iostream>
#define PI 3.1415926
#define FUDGE(k) k+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);PRINT2(b,c)
#define MAX(a,b)(a<b? b:a)
using namespace std;
void main()
{
{int x=2;
PRINT(x*FUDGE(2));
}
{
for(int cel=0;cel<=100;cel+=50)
PRINT2(cel,9.15*cel+32);
}
{int x=1,y=2;
PRINT3 ( MAX(x++,y),x,y);
PRINT3 (MAX(x++,y),x,y);
}
}
这个程序有错吗
#define PI 3.1415926
#define FUDGE(k) k+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);PRINT2(b,c)
#define MAX(a,b)(a<b? b:a)
using namespace std;
void main()
{
{int x=2;
PRINT(x*FUDGE(2));
}
{
for(int cel=0;cel<=100;cel+=50)
PRINT2(cel,9.15*cel+32);
}
{int x=1,y=2;
PRINT3 ( MAX(x++,y),x,y);
PRINT3 (MAX(x++,y),x,y);
}
}
这个程序有错吗