sudoju 2024. 4. 21. 19:33

2의2승 2의 3승을 구해주는 함수가 있다.

#include <iostream>
#include <cmath>

using namespace std;

int main()
{
    int n = 2;
    int pow_2 = (int)pow(2, n);
    
    cout << pow_2 << '\n';
    
    return 0;
}

 

답은 4가나올 것이다 끄으읕