[求助]哪位请指点一下我错在哪里,谢谢!
我是初学者,安装了dev c++的开发工具,但是使用起来偶尔会出问题。即按照书本的案例编写的程序,仔细检查了几遍,和书上的一样,但是运行时仍会提示错误,该如何是好?
#include <iostream>
int Doubler(int AmountToDouble);
int main()
{
using std::cout;
int result = 0;
int input;
cout << "Enter a number between 0 and 10,000 to double:";
std::cin >> input;
cout << "\nBefore doubler is called...";
cout << "\ninput:" << input << " doubled:" << result << "\n";
result = Doubler(input);
cout << "\Back from Doubler...\n";
cout << "\ninput:" << input << " doubled:" << result << "\n";
char response;
std::cin>>response;
return 0;
}
int Double(int original)
{
if (original <= 10000)
return original * 2;
else
return -1;
std::cout << "You can't get here!\n";
}