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
what is diff between static and dynaic arrys?
How do i automate a website www.flyashx.com without having any test cases witin a week time.
Develop a parameterized action that accomplishes the following a. Launch a browser of users choice ( example : IE, chrome etc) b. Open up a search engine (Google, Bing etc) c. Perform a search d. Click a particular link depending on the user’s choice ( 1st , 2nd or third link)
Why is it recommended to close the database connection every time after the work is completed?
How to delete a cookie using vbscript?
Explain the extension .hta?
How to make professional test report using vbscript code in UFT, which gives us complete analysis of the test.
please can you help me to get a code of flames using a visual basic 6
What methods are used to create text files and open text files in the vbscript language?
How to throw an error in vbscript?
Which operator is used to perform the comparison among 2 operands in the vbscript language?
How are values assigned to string type and numeric type variables?
How can the spaces from the string be removed?
Please let me Know regarding any material regarding VB Scripting which should be easily understandable for Beginners.
Set srchobj=Description.Create() srchobj("type").value="text" srchobj("name").value="q" srchobj("html tag").value="input" browser("micclass:=google").Page("micclass:=google").webedit (srchobj).Set "qtp" what's wrong in my code pls tell me ? the above code working fine and i got my result pass,now i am trying to run the program it shows general run time error why?pls help me i am in learning stage ?