You are on page 1of 1

'Write a VBScript program in QTP to multiply two numbers Option Explicit Dim x,y,z x=InputBox("Enter a value")

y=InputBox("Enter a value") z=x*y MsgBox(z)

'Write a VBScript program in QTP to Add two numbers Option Explicit Dim x,y,z x=InputBox("Enter a value") y=InputBox("Enter a value") z=CInt(x)+y MsgBox(z) Write a VBScript program in QTP,To display given number if EVEN NUMBER. Option Explicit Dim x x=InputBox("Enter a value:") If x Mod 2=0 Then MsgBox(x&"is even number") End If 'Write a program for finding out whether the given number is, Even number or Oddnumber? Option Explicit Dim x x=InputBox("Enter a value :") If x Mod 2=0 Then MsgBox(x&"is even number") Else MsgBox(x&"is odd number") End If

You might also like