Me again. Another stump. This time I have to recieve two inputs from the user and perform a few math operations using both those two inputs.
Meaning I have String a, b; for my two user inputs. Is it possible to get all 4 of my math operations, addition, aubtraction, multiplication, division, from just a and b or do I have to create another 6 more String variables and recieve 6 more inputs, to a total of 8 inputs from the user.
Lunaticrr
0
Light Poster
Recommended Answers
Jump to PostMe again. Another stump. This time I have to recieve two inputs from the user and perform a few math operations using both those two inputs.
Meaning I have String a, b; for my two user inputs. Is it possible to get all 4 of my math operations, addition, aubtraction, …
Jump to PostYou mean something like this?
PLEASE ENTER TWO INPUTS ?A:B PLEASE ENTER AN OPERATOR ? C IF C='+' THEN PRINT A+B ENDIF IF C='-' THEN PRINT A-B ENDIF . . .
[IMG]http://img476.imageshack.us/img476/5171/cut20ln.png[/IMG]
Piworld ™
[Tis simple as …
All 8 Replies
iamthwee
Lunaticrr
0
Light Poster
iamthwee
Lunaticrr
0
Light Poster
iamthwee
Lunaticrr
0
Light Poster
Phaelax
52
Practically a Posting Shark
psodhi
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.