![]() |
#2
zxwangyun2008-10-22 16:58
|
我弄的通过键盘输入数字,然后显示出其中有多少个负数
#include <iostream>
main()
{
int amount = 0, val;
while (std::cin >> val)
if (val < 0)
++amount;
std::cout << << " the amout is : " << amount << std::endl;
system("PAUSE");
return 0;
}
但是输入数据以后不显示结果啊