I have the following visual c++ code
#include <iostream>
#include <string>
#include <sstream>
#include <math.h>
using namespace std;
int Main()
{
double investment = 0.0;
double newAmount = 0.0;
double interest = 0.0;
double totalSavings = 0.0;
int month = 1;
double interestRate = 0.065;
cout << "Month\tInvestment\tNew Amount\tInterest\tTotal Savings";
while (month < 10)
{
investment = investment + 50.0;
if ((month % 3 == 0))
{
interest = Math::Round((investment * Math::Round(interestRate/4, 2)), 2);
}
else
{
interest = 0;
}
newAmount = investment + interest;
totalSavings = newAmount;
cout << month << "\t" << investment << "\t\t" << newAmount << "\t\t" << interest << "\t\t" << totalSavings;
month++;
}
string mystr = 0;
getline (cin,mystr);
return 0;
}
But its giving me problems using Math::Round, truly I don't know how to use this function using visual c++