Welcome.please sign up.
By signing up or logging in, you agree to our Terms of serviceand confirm that you have read our Privacy Policy.
Already a member? Go to Log In
Welcome.please login.
Forgot your password
Not registered yet? Go to Sign Up
#include<iostream> using namespace std; #define area(l,b) (l*b) #define perimeter(l,b) (2*(l+b)) int main() { cout << "Area is "<<area(5,2)<<" and perimeter is "<<perimeter(5,2)<<".\n"; return 0; }
#include<iostream> using namespace std; #define equal(a,b) (a==b) int main() { cout << equal(5,2) << "\n"; cout << equal(5,5) << "\n"; return 0; }
#include<iostream> using namespace std; #define avg(a,b) ((a+b)/2.0) int main() { cout << avg(5,2) <<"\n"; return 0; }
#include<iostream> using namespace std; #define abs(a) ((a<1)?(-1*a):a) int main() { cout << abs(-5) <<"\n"; cout << abs(5) <<"\n"; return 0; }
#include<iostream> using namespace std; #define si(p,r,t) ((p*r*t)/100.0) int main() { cout << si(1000,12,3) <<"\n"; return 0; }