I want to make my prompt somewhat nicer in that a user can enter their input for a fraction in the normal fashion:
i.e. 4/5 6/7
and be able to store the numerators and denominators on the programming side.
a = 4
b = 5
c = 6
d = 7
How would I go about doing this?
For this one... I think this should do:
Obviously, if you want longer inputs or more complex ones, you will have to read it all in one go and parse it from there.
cin >> num >> op >> num >> temp >> num >> op >> num;
Thought so, was just wondering if there was a very simple way to do it depending on the length/complexity of the input. Got it, thanks.
Originally Posted by Elysia