Created
January 18, 2015 15:48
-
-
Save joffilyfe/08a000b712719af02515 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
//nossas funçoes | |
int fazQuadrado(int numero); | |
int fazCubo(int numero); | |
int main(void) { | |
int i, entrada; | |
scanf("%d", &entrada); | |
for (i = 1; i <= entrada; i++) { | |
printf("%d %d %d\n", i, fazQuadrado(i), fazCubo(i)); | |
} | |
return 0; | |
} | |
//corpo das funçoes | |
int fazQuadrado(int numero) { | |
numero *= numero; | |
return numero; | |
} | |
int fazCubo(int numero) { | |
numero *= numero * numero; | |
return numero; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment