2的n次方用c语言怎么表示

C语言有函数,需要头文件#include <math.h>
用pow(2,n)就可以了!

double result = pow(2,n);

posted @ 2019-03-25 15:38  瘋耔  阅读(3513)  评论(0编辑  收藏  举报
跳至侧栏