i have to use an array for this and when i run my program my computer starts to spit out number can someone help me. the critia is that it can read from base 2-9 and will give me the answer in base 10.
#include <iostream>
using namespace std;
int main ()
{
int myarray[8];
int answer=0;
int base;
int num;
int i;
cout<< "please put number in from right to left";
cin>>num;
for(i=0;i>=0;i++)
{
cout<<(answer+ myarray[i]*base^(7-i));
}
return 0;
}