- 8,712
- 11
I want to make a mathematical program that can add and subtraction numbers
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Originally Posted by 4318MichaelJohnson4318
LOL. Let me guess you doing that VB book with the guided program development?
Anyways what you need to do is create the gui using something like a radio button. Create a case statement for each radio button. For example it should be something for Case radAdditionChoice.checked = true THEN variable1 + variable2
you will need the user to input both variables via a textbox and pull the data from the textbox into a variable
if you need more help i can go into better detail but basically just use a case statement.
Originally Posted by 4318MichaelJohnson4318
LOL. Let me guess you doing that VB book with the guided program development?
Anyways what you need to do is create the gui using something like a radio button. Create a case statement for each radio button. For example it should be something for Case radAdditionChoice.checked = true THEN variable1 + variable2
you will need the user to input both variables via a textbox and pull the data from the textbox into a variable
if you need more help i can go into better detail but basically just use a case statement.
This. I sometimes also use a label for the answer.Originally Posted by LuckyLuchiano
What I use to do was have 3 text boxes and a "Calculate" button
1st 2 text boxes are for the numbers 3rd is for the answer
I would declare all three such as
Dim NumberOne, NumberTwo, Answer as Integer
NumberOne = TextBox1.Text
NumberTwo=TextBox2.Text
Answer=Textbox3.Text
NumberOne - NumberTwo = Answer
my syntax is prob wrong because I havent done this in a few months, but along the lines of that
This. I sometimes also use a label for the answer.Originally Posted by LuckyLuchiano
What I use to do was have 3 text boxes and a "Calculate" button
1st 2 text boxes are for the numbers 3rd is for the answer
I would declare all three such as
Dim NumberOne, NumberTwo, Answer as Integer
NumberOne = TextBox1.Text
NumberTwo=TextBox2.Text
Answer=Textbox3.Text
NumberOne - NumberTwo = Answer
my syntax is prob wrong because I havent done this in a few months, but along the lines of that
Yeah, that sounds about right but it's been about a year since I last used Visual Studios lol. Can't he do a drop down that assign an operator (+,-, /, *) instead of doing something static like that? I forgot the exact syntax but let's say + is selected, the statement would go like this... If plus is selected then numberone + numbertwo = answer and then follow with Else if's for subtraction, division, multiplication?Originally Posted by gregbutler20
This. I sometimes also use a label for the answer.Originally Posted by LuckyLuchiano
What I use to do was have 3 text boxes and a "Calculate" button
1st 2 text boxes are for the numbers 3rd is for the answer
I would declare all three such as
Dim NumberOne, NumberTwo, Answer as Integer
NumberOne = TextBox1.Text
NumberTwo=TextBox2.Text
Answer=Textbox3.Text
NumberOne - NumberTwo = Answer
my syntax is prob wrong because I havent done this in a few months, but along the lines of that
Yeah, that sounds about right but it's been about a year since I last used Visual Studios lol. Can't he do a drop down that assign an operator (+,-, /, *) instead of doing something static like that? I forgot the exact syntax but let's say + is selected, the statement would go like this... If plus is selected then numberone + numbertwo = answer and then follow with Else if's for subtraction, division, multiplication?Originally Posted by gregbutler20
This. I sometimes also use a label for the answer.Originally Posted by LuckyLuchiano
What I use to do was have 3 text boxes and a "Calculate" button
1st 2 text boxes are for the numbers 3rd is for the answer
I would declare all three such as
Dim NumberOne, NumberTwo, Answer as Integer
NumberOne = TextBox1.Text
NumberTwo=TextBox2.Text
Answer=Textbox3.Text
NumberOne - NumberTwo = Answer
my syntax is prob wrong because I havent done this in a few months, but along the lines of that
Originally Posted by seniosoul
i don't know how to program, but learning is no problem, where should i start.
I talked to my cousin in law, whos a math teacher, she told me to write out an algorithm, and that is done.
where should i get the knowledge, what language, C, C+, C++?
i just got Visual Studio, I guess i'm ready.
Originally Posted by seniosoul
i don't know how to program, but learning is no problem, where should i start.
I talked to my cousin in law, whos a math teacher, she told me to write out an algorithm, and that is done.
where should i get the knowledge, what language, C, C+, C++?
i just got Visual Studio, I guess i'm ready.
c'mon ebpo, cut me some slackOriginally Posted by ebpo
Originally Posted by seniosoul
i don't know how to program, but learning is no problem, where should i start.
I talked to my cousin in law, whos a math teacher, she told me to write out an algorithm, and that is done.
where should i get the knowledge, what language, C, C+, C++?
i just got Visual Studio, I guess i'm ready.
C+ ? Didn't even know that existed
All my classes were in C++. Learn OOP. Then, all languages are (pretty much) the same (i did say pretty much).
Also, what do you want to program for? Software? Web? is it to find a job or just for fun?