Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- ЛАБОРАТОРНАЯ РАБОТА № 2
- ВАРИАНТ 20
- ВЫПОЛНИЛ: ДМИТРИЙ МИШУТИН КЭ - 101
- */
- #include <stdio.h>
- #include <iostream>
- #define a 10
- #define b 20
- #define c 2
- #ifndef a
- #error a не определена
- #endif
- #ifndef b
- #error b не определена
- #endif
- #ifndef c
- #error c не определена
- #endif
- #if(c == 1)
- #define F(a, b, c) a * b
- #elif(c == 2)
- #define F(a, b, c) a + b
- #elif(c == 3)
- #define F(a, b, c) a - b
- #endif
- using namespace std;
- int main(){
- printf("%d\n", F(a, b, c));
- system("PAUSE");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement