Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...


Write a script to print below pattern 5 4 3 2 1 5 4 3 2 5 4 3
5 4 5

Answers were Sorted based on User's Feedback



Write a script to print below pattern 5 4 3 2 1 5 4 3 2 5 4 3 5 4 5 ..

Answer / ashok kumar

Here....

For i = 1 To 5
For j = 5 To i Step -1
temp = temp & " " & j
Next
MsgBox temp
temp = ""
Next

Is This Answer Correct ?    12 Yes 3 No

Write a script to print below pattern 5 4 3 2 1 5 4 3 2 5 4 3 5 4 5 ..

Answer / vishnu

'5 4 3 2 1
'5 4 3 2
'5 4 3
'5 4
'5
For i=5 to 1 step -1
temp = temp & i
Next
For i=5 to 1 step -1
print temp
temp = left(temp,i-1)
Next

Is This Answer Correct ?    4 Yes 2 No

Write a script to print below pattern 5 4 3 2 1 5 4 3 2 5 4 3 5 4 5 ..

Answer / sireesha

For i = 1 To 5
For j = 5 To i Step -1
temp = temp & " " & j
Next
MsgBox temp
temp = temp&vbnewline
Next
msgbox temp

Is This Answer Correct ?    2 Yes 0 No

Write a script to print below pattern 5 4 3 2 1 5 4 3 2 5 4 3 5 4 5 ..

Answer / ravindra v

For i=1 to 5
For j=5 to i step -1

temp=temp&j

Next
print temp
temp=null
Next

Is This Answer Correct ?    0 Yes 0 No

Write a script to print below pattern 5 4 3 2 1 5 4 3 2 5 4 3 5 4 5 ..

Answer / machiraju veera venkata naga s

p=""
For i = 1 To 5 Step 1
t=""
For j = 5 To i Step -1
t=t&" "&j
Next
p=p&""&t
Next
print p

(Test this code right now... Its mine.)

Is This Answer Correct ?    0 Yes 0 No

Write a script to print below pattern 5 4 3 2 1 5 4 3 2 5 4 3 5 4 5 ..

Answer / bhargavi

For i = 1 To 5
For j = 5 To i Step -1
  temp = temp & " " & j
Next
If i=5 Then
  print temp
End If
Next 

Is This Answer Correct ?    0 Yes 0 No

Write a script to print below pattern 5 4 3 2 1 5 4 3 2 5 4 3 5 4 5 ..

Answer / pravati

Write a script to print below pattern 5 4 3 2 1 5 4 3 2 5 4 3 5 4 5
x="5 4 3 2 1 5 4 3 2 5 4 3 5 4 5"
y=split(x," ")
msgbox ubound(y)
For i = 0 to ubound(y) Step 1
msgbox y(i)
Next

Is This Answer Correct ?    0 Yes 0 No

Write a script to print below pattern 5 4 3 2 1 5 4 3 2 5 4 3 5 4 5 ..

Answer / pushkar1206

a=inputbox("enter number")
b=len(a)
For i=b to 1 step -1
c=left(a,i)
d=d&c&vbnewline
Next
msgbox d

Is This Answer Correct ?    0 Yes 0 No

Write a script to print below pattern 5 4 3 2 1 5 4 3 2 5 4 3 5 4 5 ..

Answer / phu

for i=4 to 0 step-1
{
for j=0 to i step+1
print (5-j)
}

Is This Answer Correct ?    0 Yes 4 No

Post New Answer



More QTP Interview Questions

In an(AUT) web application their are two frames as fraMain and fraFooter. Both the frames contain link which needs to be retrieved at a single step. I tried it using "Regular Expression" as fra.* but QTP doesn't recognize the object. So Plz help me out to get resolve the problem:-)

1 Answers  


Does QTP run in any environment?

0 Answers  


how to write the descriptive programming in QTP for remove the object value and substitute, with a variable then call the validation from excel

0 Answers  


How will u declare a variable to access multiple actions? a)Dim b)Global c)Public d)Private

1 Answers  


How to compare 2 excel files using QTP? How to compare 2 PDF files using QTP?

1 Answers  






how i can get the value of label box , please any body tell me script of that code

1 Answers  


how can i use text check point in descriptive programming. or else is there any way to compare the text in the application and the text in data table.

2 Answers  


Hi... Can anybody help me to write the vbscript for this question..!!! Am having a string "HELLO WORLD", i want to find how many "L"s are there.....????? --> HANEEF <--

5 Answers  


pls dont join MIndq nageshwar rao...Nageshwar rao sir didnt teach QTP indepth...he teach basics only...atleast he dont know about INSTR concept...this concept take min 30 min...buthe teach 3 min only...like this so many concepts are missing in class. IN CLASS ROOM NAGESHWAR RAO SIR HIPNATIZE THE STUDENTS....WITH OTHER ISSUES.. dont join... look other institutes...this is my personal openion share your comments thank u

1 Answers   Mind Q Systems,


How can I deploye a 'QTP Runtime environment only'

1 Answers   Indexis,


Take a situation when you are working with QTP, suddenly system has crashed.so you again start the system. My questyion is how can QTP directly opened when the system desktop appears.

1 Answers  


can anyone answer this question ........in the DICTIONARY OBJECT....i created the dictionary object in reserved object ok....here i have some sets of values ...now i want to retrieve the item i done too ok.......here my question is now i saved the test and close the qtp tool ,again i opened now i retrieve the same item in the dictionary is it possible ????. friends when i try to do this i am getting empty message box i mean no value will be retrieved ......ans me any one plz...

1 Answers   FSS,






Categories