Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

what is the standards used for writing the script in QTP

2345


What are the differences between sub procedures and function procedures?

995


Which date function is used in the vbscript language to find the difference between the 2 dates?

1069


How to write VB script for login module?

3194


How will you get the natural logarithm of the given number in vbscript?

1052


Explain about tristate constants in vbscript?

1092


Mention if qtp generates vbscript code as we record actions, can't it possible to directly write using vbscript code when qtp does the same thing too?

1015


What is the difference between vb debugger and the script debugger?

1148


What are the naming conventions while declaring a variable in the vbscript language?

1052


Differentiate javascript and vbscript?

1044


How to assign a date value to a variable?

1105


How will you get the exponent of the given number in vbscript?

1036


Which operator can be used to do an xor operation in vbscript?

1265


how to write codings in QTP using vb script. please help me. i am new to QTP. it is easy or very much tough. please tell me

14225


How to Import data from a file (file is on the desktop) to the data table

2010