   simple math error? c++
  hello, so far i have this for a simple financial calculator program and was wondering why my output does not give me what i expectfor example.i enter 100 at 15% for 1 year i expect 115 back but i get some ridiculous number like -9.34383e + 063.what is wrong with my program/* this program shows the user how much they could potentially make on interest on how much money they are wishing to initially invest.*/#include <iostream>#include <cmath>using std::cin;using std::cout;// program is going to contain many financial calculators// for instance cost of living calculatorsint main (){double initial_ammount;double interest_per_year;double final_bank_balance;double overall_interest_earned;char choice;double num_of_years;double interest_per_year_as_decimal;double bank_balance_multiplier;cout << " hello and welcome to my finance calculator ";cout << "\n";cout << " if you want to see how much money you would have in the bank after a certain ammount of years ";cout << "\n";cout << " please enter 1 ";cout << "\n";cout << " please enter your choice ";cin >> choice;switch(choice){case '1' :cout << " please enter the ammount of money you wish to initially save ";cin >> initial_ammount;cout << " please enter how much interest you get per year (between 1 and 15 %) ";cin >> interest_per_year;cout << "please enter the number of years you wish to save for ";cin >> num_of_years;bank_balance_multiplier = std::pow((1+interest_per_year_as_decimal),(num_of_years));final_bank_balance = (bank_balance_multiplier * initial_ammount);cout << " your final bank balance = " << final_bank_balance << " pounds ";break;case '2' :cout << " this is in progress ";cout << "\n";break;}cout<< " please enter the initial ammount you wish to save ";cin >> initial_ammount;    std::cout << "Press enter to continue" << std::endl;std::cin.get();}
  never mind i found out that i hadn't showed what interest_per_year_as_decimal was   ;  interest_per_year_as_decimal is not set-upEDIT: Okay, you already found it yourself.   ;  A good programming practice you should get into is initializing your variables upon declaring them otherwise expect to get garbage answers like the one you are getting;);  i thought i did. i was fiddling around trying to get the pow() workin i must have left it out. but thanks for the advice :Dand thanks for helping haegarr   