Traditional Addition and Subtraction

Z

Zunaster

I am a newbie in programming and I am facing problem in adding and
subtracting numbers, which also involves carrying of a number. A
program to add , subtract and multiply digits in the traditional
manner of carrying and borrowing. In this program no arrays have been
used, instead the concept of GIGO (Garbage In Garbage Out) is used for
carrying out the process. the goal is to calculate the digits in the
traditional manner, which is illustrated in the process.

If a.Length > b.Length Then
z = equallength(a, b)
TextBox2.Text = z
ElsIf b.Length > a.Length Then
z = equallength(b, a)
print z
 
H

Harry

I am a newbie in programming and I am facing problem in adding and
subtracting numbers, which also involves carrying of a number. A
program to add , subtract and multiply digits in the traditional
manner of carrying and borrowing. In this program no arrays have been
used, instead the concept of GIGO (Garbage In Garbage Out) is used for
carrying out the process. the goal is to calculate the digits in the
traditional manner, which is illustrated in the process.

If a.Length > b.Length Then
z = equallength(a, b)
TextBox2.Text = z
ElsIf b.Length > a.Length Then
z = equallength(b, a)
print z


If you are new to programming, you may want to take a look at this.
http://pine.fm/LearnToProgram/

Harry
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,682
Members
48,796
Latest member
Greg L.

Latest Threads

Top