【发布时间】:2015-04-14 07:23:05
【问题描述】:
我是 C++ 新手,我想知道程序是否要求您输入分数 (a/b),您如何删除除号 ("/") 以获得 a 和 b 的值?
例如:
int x1, x2, y1, y2;
cout << "The programk performs arithmetic operations on two rational numbers." << endl;
cout << "Enter a rational number <a/b> : ";
cin >> // what can i do to get the value of a for x1 and b for x2??
感谢您的宝贵时间,我们将不胜感激。
【问题讨论】:
-
读取一个字符并忽略它。