Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- /*
- SEM DIRETIVAS
- int quadrado(int a){
- return a*a;
- }
- int main(){
- std::cout << quadrado(5);
- return 0;
- }
- */
- /* COM DIRETIVAS
- #define quadrado(a) a*a
- int main(){
- int z;
- z = quadrado(5);
- std::cout << z;
- return 0;
- }
- */
- #define troca(a,b) {int c = a; a = b; b = c; }
- int main(){
- int x = 10;
- int y = 20;
- troca(x,y);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement