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
Answer Posted / 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 |
Post New Answer View All Answers
How to delete a cookie using vbscript?
How to create a cookie using vbscript?
Which function is used in the vbscript language to convert the specified expression into a date type value?
How to assign a date value to a variable?
what is inner join? what is outer join? what is a constraint? tell me about rdbms? tell me about acid properties?
How to pass argument by reference to a function in vbscript?
How you can call vbscript functions?
how to write a vb script in QTP for yahoo registration form, i want to check the performance also like performance test, stress, load test like that.
hi all, i had a question, that how to find out hiding a coloumn in a table i had a table having the following column names NAME DESCRIPTION CREATED TIME CREATED USER if i right clicked on a NAME column it will displays a menu having the same column names in a list like NAME DESCRIPTION CREATED TIME CREATED USER with check boxes.if i unched any check box, that column name should not be appear in the main table column names could anyone please solve this problem?
How will you get a string with the specified character the specified number of times in vbscript?
What is purpose of scripting.filesystemobject class in vbscript?
how to acces the remote mechine using vb cript(QTP)
What is the purpose of on error resume next statement?
What is the use of the date function in the vbscript language?
What are the different types of loops available in the vbscript language?