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 purpose of drive object of scripting.filesystemobject class in vbscript?

992


How will you format a number in percetage format in vbscript?

978


Explain about the extension .hta?

1048


What are the differences between sub procedures and function procedures?

966


create a form to accept username and password validate the username and password with using message box, display the corresponding user message

2614


how to check whether link is disabled in QTP??

6096


If else for do while select in vb script?

1135


Which keyword is used to declare a variable in the vbscript language?

928


Explain How do you create a recordset object in vbscript?

1000


Which data type/types are supported by vbscript language and what are their specialties?

1019


Mention how to create a cookie using vbscript?

982


What is purpose of scripting.filesystemobject class in vbscript?

1102


Which function allows you to instantiate an object given its programmatic identifier or progid?

1014


How to pass argument by reference to a function in vbscript?

1032


if u ve resrevation for train and u get a number supose 1234xxxokie.after sucessul entering all required fields. now u put that number in search and want to chk wether these ar same or not if both ar same then its okie otherwise test fail.what would be the vb script code for it to compare these two values of different page.

1821