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



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 / 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

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 / 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

More VB Script Interview Questions

Out of the different type of operators, which are evaluated first and last in the vbscript language?

0 Answers  


I have a webtable and many objects are embedded in side.(like buttons,checkboxes etc). How to know how many such objects are there? what is the class of that objects?

1 Answers   HP, TCS,


Could Anybody Please tell me What is the script for Find 3rd Largest element in the Array without using a SORT function int Find(int arr[], int size); Thanks in Advance..

0 Answers   Amazon,


How do you declare a variable in vbscript?

0 Answers  


How to return only alpha bate string from an string str = "bibhu@#$%&das&*)(SUndar"

4 Answers   Cap Gemini,






I am working on QTP, got struck in one place.. In my application depending upon configuration WebEdit count is increasing/ decreasing.. how to get these webedits..

0 Answers  


What is the use of the date function in the vbscript language?

0 Answers  


Can someone please tell me what poor design in a relational database (not the layout or style) is and how it can be avoided? PLEASE...im desperate.

0 Answers  


What is variant in vb script?

0 Answers  


Hi all..I have two values. a=20 ,b=30 I want to perform c= a+b and c= a*b using user define function.please anyone give the answer

1 Answers  


what is the use of QCUtil? explain with one example?

1 Answers  


wat is com(common object model)object for mozilla firefox??? if any knows the exact answer....plz rply me

2 Answers  


Categories