#include <iostream>
using namespace std;
int exponent(int x){
int n = 6;
for (int i = 0 ;i<4 ;i++){
n*=6;
}
return x;
}
void print_exponent(int x){
cout<<"6^5 = "<<x<<endl;
}
int main () {
int x;
print_exponent(x);
return 0;
}
I wrote 2 functions, first one to calculate 6^5, second one to print the value, when I run this, it prints wrong calculation (28), What's wrong with this function?