0

I'm working on a function that requires me using a pow function, everything was working fine but I had an issue located in this section of code. This second cout prints 1. it should ouput something like 1.00584974 instead.

    double b= 1/12;
    annmult= pow(annmult,b);
    cout<< annmult<< endl;

VVVVVVV below is just my code so far VVVVVVV

#include <iostream>
#include <cmath>
using namespace std;

int main()
{
    double apr;
    cout<< "Enter APR: ";
    cin>> apr;

    double annmult;
    annmult= apr/100;
    annmult=annmult+1;
    cout<< annmult<< endl;
    double b= 1/12;
    annmult= pow(annmult,b);
    cout<< annmult<< endl;
}

0 Answers0