#define TRIPLE(x) x*x*x
#include<stdio.h>
#include<stdlib.h>
int main(){
int num,triple;
printf("Enter one integer: ");
scanf("%d",&num);
triple=TRIPLE(num);
printf("%d的三次方為%d\n",num,triple);
triple=TRIPLE(5);
printf("5的三次方為%d\n",triple);
system("pause");
return 0;
}
沒有留言:
張貼留言