欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

第六节 练习8

程序员文章站 2022-04-04 11:09:11
...
#include<iostream>
#include<iomanip>
#include<cstdio>
#include<cmath>

using namespace std;

#define PI 3.14

int main()
{
   int a;
   long b;  //长短结合 
   cout << "输入:";
   cin >> a; 
   
   b = pow(2,a);  // ^是 位异或 运算符 
   cout << b;
   
   return 0;
}

结果:

第六节 练习8