This discussion is now closed.
Dim Number As Integer
Dim SquareNumber As Integer
Dim CubeNumber As Integer
Dim CombinedNumber As Integer
frmsqnumber.Show
For Number = 1 To 10
SquareNumber = Number * Number
CubeNumber = Number * Number * Number
Print "Square of"; Number; Tab; "Cube of"; Number
Print Trim(SquareNumber); Tab; Trim(CubeNumber)
Print
Next Number
Dim rowNum As Integer
Dim colNum As Integer
Dim result As String
'print top line
result = "+ 1 2 3 4" & vbCrLf
For rowNum = 0 To 3
'add row header
result = result & (rowNum + 1).ToString & " "
For colNum = 0 To 3
'add results for each addition
result = result & ((colNum + 1) + (rowNum + 1)).ToString & " "
Next
'add row footer
result = result & vbCrLf
Next
TextBox1.Text = result
Dim rowNum As Integer
Dim colNum As Integer
Dim result As String
'print top line
result = "+ 1 2 3 4" & vbCrLf
For rowNum = 0 To 3
'add row header
result = result & (rowNum + 1).ToString & " "
For colNum = 0 To 3
'add results for each addition
result = result & ((colNum + 1) + (rowNum + 1)).ToString & " "
Next
'add row footer
result = result & vbCrLf
Next
TextBox1.Text = result
Dim colNum, rowNum, result as Integer
For rowNum = 0 to 4
For colNum = 0 to 4
result = rowNum + colNum
frmNestedSum.Print result;
Next
frmNestedSum.Print
Next
This code will give a printout that looks like this in VB6Dim colNum, rowNum, result as Integer
For rowNum = 0 to 4
For colNum = 0 to 4
result = rowNum + colNum
frmNestedSum.Print result;
Next
frmNestedSum.Print
Next
This code will give a printout that looks like this in VB6Last reply 1 day ago
Is MathsFM French Alevels good for a CS degree at top uni (OX, UCL, Durham etc)Last reply 3 days ago
OCR A-level Computer Science Paper 1 (H446/01) - 12th June 2023 [Exam Chat]Last reply 2 weeks ago
OCR A-level Computer Science Paper 2 (H446/02) - 19th June 2023 [Exam Chat]Last reply 3 weeks ago
AQA A-level Computer Science Paper 1 (7517 1A - 1E) - 12th June 2023 [Exam Chat]Last reply 1 month ago
Not receiving any response from University of Birmingham.Last reply 3 months ago
OCR GCSE Computer Science Paper 1 (J277/01) - 19th May 2023 [Exam Chat]Last reply 3 months ago
AQA GCSE Computer Science Paper 2 (8525/2) - 25th May 2023 [Exam Chat]Last reply 1 day ago
Is MathsFM French Alevels good for a CS degree at top uni (OX, UCL, Durham etc)Last reply 3 days ago
OCR A-level Computer Science Paper 1 (H446/01) - 12th June 2023 [Exam Chat]Last reply 2 weeks ago
OCR A-level Computer Science Paper 2 (H446/02) - 19th June 2023 [Exam Chat]Last reply 3 weeks ago
AQA A-level Computer Science Paper 1 (7517 1A - 1E) - 12th June 2023 [Exam Chat]Last reply 1 month ago
Not receiving any response from University of Birmingham.Last reply 3 months ago
OCR GCSE Computer Science Paper 1 (J277/01) - 19th May 2023 [Exam Chat]Last reply 3 months ago
AQA GCSE Computer Science Paper 2 (8525/2) - 25th May 2023 [Exam Chat]