<分区>
#include <iostream>
int main()
{
std::cout << "Nerdrvox skzbnakan gumar = ";
double invmoney = 0;
std::cin >> invmoney;
std::cout << std::endl << "Nerdrvox skzbnakan gumar = " << invmoney;
std::cout << std::endl << "Qani tarov = ";
int years = 0;
std::cin >> years;
std::cout << std::endl << "Qani tarov = " << years;
/*
* After this point the cmd says press any key to continue, after pressinga key
* cmd closes. However it is supposed to do this.
*/
double summary = invmoney;
int months = 12 * years;
for (int i = months; i < 0; i--)
{
std::cout << "Month " << i - months << std::endl << "Invested money"
<< summary << std::endl;
double percent = summary * 0.1;
std::cout << "Add percent" << percent << std::endl;
summary += percent;
std::cout << "Sum for month " << i - months << "is " << summary;
}
return 0;
}
能否请您告诉我为什么以及如何解决它?