我需要制作一个指数计算器,但它最多只能处理20 ^ 15,它如何处理更多?

时间:2017-11-20 02:53:32

标签: c++

//This is my code so far
//It is in microsoft studio visual

#include "stdafx.h"
#include <iostream>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>


using namespace std;

int main()
{
 int a, b;

 cout << "Input a whole number:"; //The following lines are to make it interactive
 cin >> a;
 cout << "Input a whole number:";
 cin >> b;

 int result = 1;
 for (int i = 0; i < b; i++)
     result *= a;

 cout << "The Answer is:" << result;
 cout << "\n";
 system("PAUSE");
}
//How do I expand the power of it to handle more?

我只需要增加它的力量来处理更多。我需要这个课程,我无法弄明白。我符合资格,但我希望它更强大。

0 个答案:

没有答案