hi i have a project and i want a reference how to make a multiplication table using for loop.,pls help me.,thank you
Multiplication using for loopfor loop
Page 1 of 1
1 Replies - 3862 Views - Last Post: 10 March 2010 - 04:18 AM
Replies To: Multiplication using for loop
#2
Re: Multiplication using for loop
Posted 10 March 2010 - 04:18 AM
Please help you on what? You have *nothing* so far. I can help you better if you show your current attempt.
But, here's the algorithm:
As you can see, by multiplying the current row by the current column, you get a multiplication table. please not that i and j are normal for loop variables that begin at 0, so we increment both by 1 before beginning (So there is not a row of 0's
But, here's the algorithm:
for each row with variable i
for each column with variable j
print (i+1)*(j+1)
As you can see, by multiplying the current row by the current column, you get a multiplication table. please not that i and j are normal for loop variables that begin at 0, so we increment both by 1 before beginning (So there is not a row of 0's
Page 1 of 1
|
|

New Topic/Question
Reply




MultiQuote






|