Header Ads

Write a program for finding out whether the given number is, Even number or Odd number?

Dim num
num=inputbox ("Enter a number")

If num mod 2=0 Then
msgbox "This is a Even Number"
Else
msgbox "This is a Odd Number"
End If

8.3.3 Read two numbers and display the sum?

Dim num1,num2, sum
num1=inputbox ("Enter num1")
num2=inputbox ("Enter num2")

sum= Cdbl (num1) + Cdbl (num2) 'if we want add two strings conversion require
msgbox ("Sum is " &sum)
Powered by Blogger.