Write a program to display the numbers in the below format using for loops?
1 2 3 4
5 6 7 8
9 10 11 12
and
Write a program to display the numbers in the below format using for loops.
1
2 3
4 5 6
7 8 9 10
Answers were Sorted based on User's Feedback
Answer / vamsi
Write a program to display the numbers in the below format using for loops.
1
2 3
4 5 6
7 8 9 10
| Is This Answer Correct ? | 3 Yes | 3 No |
Answer / prathyusha
num=0
For i=1 To 4
For j=1 To i
num=num+1
val=val&num
Next
res=res&vbCrLf&val
val=""
Next
MsgBox res
o/p
******
1
23
456
78910
************************
num=0
For i=1 To 3
For j=1 To 4
num=num+1
val=val&num
Next
res=res&vbCrLf&val
val=""
Next
MsgBox res
o/p
*******
1234
5678
9101112
| Is This Answer Correct ? | 0 Yes | 0 No |
How do you declare a variable in vbscript?
Explain about arrays in vb script?
What is purpose of scripting.filesystemobject class in vbscript?
How will you release the memory acquired by an array variable in vbscript?
How can you destroy an object in vbscript?
how to declare a variable in vbscript using vbscript
Dear All, I am geting below IE error whilie executing the QTP scripts in Batch mode "Internet Explorer has encountered a problem and needs to close. We are sorry for the inconvenience." can any one suggest me how to resolve this issue . Thanks Balaji
How will you get the largest subscript of an array in vbscript?
can anyone tell me the procedure of interview held in applabs
Explain about the extension .hta?
Capture the Unique label changes on google home page for I am feeling lucky button and save those label changes to Notepad Note: Using QTP
write a vb script to display first 5 odd numbers from 1 to 100