when running code not getting results I scripted :/
<p>heyy all! just finished this code (CODEBLOCKS)..I want this:</p>

<pre>user INPUT NUMBER 
     INPUT BASE
     PRINT DECIMAL REPRESENTATION 
</pre>

<pre><code>#include &lt;iostream&gt;
#include &lt;cmath&gt;

using namespace std;


int main()
{

    string inp;
    int j;
    int dec = 0;  //store
    char base;

    cout &lt;&lt; "input number: ";
    cin &gt;&gt; inp;

    cout &lt;&lt; "input base: ";
    cin &gt;&gt; base;

    for (int i = inp.length ()-1; j = 0; ++j) 
        dec += (inp[i]-48) * pow ((float) base-48,j);

    cout &lt;&lt; "your number in base 10 is: " &lt;&lt; dec &lt;&lt; endl;

    return 0;
}
</code></pre>

<p>im new to c++ so i havent gotten good at it yet.. ://</p>
