SBuntin
asked on
Input
How do you input numbers on the same line?
EX.
Tell how many quarters , pennies, and dimes you have? 1 2 3
How are you able to input them on the same line?
EX.
Tell how many quarters , pennies, and dimes you have? 1 2 3
How are you able to input them on the same line?
seperate them with spaces (or enters). like
int q, p, d;
cout << "Tell how many quarters , pennies, and dimes you have? 1 2 3 "
cin >> q >> p >> d;
then at the prompt type "1 2 3". Let me know if you have any questions.
int q, p, d;
cout << "Tell how many quarters , pennies, and dimes you have? 1 2 3 "
cin >> q >> p >> d;
then at the prompt type "1 2 3". Let me know if you have any questions.
Opps, gashev beat me to it. Gashev, you should have answered. I'll withdraw mine.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
#include <iostream.h>
void main(void)
{
int a,b,c;
cin>>a>>b>>c;
cout<<a<<endl<<b<<endl<<c<
}