// program assignment 2.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <iostream>
#include "math.h"
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
double percentconverter;
int playerinput;
int years;
double intrates;
double answer;
cout << " Enter initial amount:" << endl;
cin >> playerinput;
cout << "Enter number of years:" << endl;
cin >> years;
cout << "Enter interest rate (percent per year):" << endl;
cin >> percentconverter;
intrates = percentconverter / 100;
answer = playerinput * (1 + intrates) ^ years;
return 0;
}
「答え=プレイヤー入力*(1 +イントラテス)^年;」行でOK プレーヤー入力の下に小さな赤い線が表示されます。関数へのポインターの何かが表示されます....そのエラーが表示されることを理解できません。また、「もし一定額の金額を年複利の固定金利で投資します。」私が確信している方程式は正しいと確信しており、完成したプログラムを実行すると、本来の方法で実行されます。方程式が間違っている場合は、遠慮なくフィードバックを残してください。ありがとうございました