Check whether a number is palindrome or not, Visual Basic Programming

Assignment Help:

Function IsPalindrome(str)

Dim iStart,iEnd,ctr,blnPalin str=trim(str)

blnPalin=true iEnd=len(str) iCnt=round(iEnd / 2) iStart=1

for ctr=1 to cint(iCnt)

if(mid(str,iEnd,1)<>mid(str,iStart,1))then

IsPalindrome=false

Exit Function end if iStart=cint(iStart)+1 iEnd=cint(iEnd)-1 next if(blnPalin=true)then IsPalindrome=true else IsPalindrome=false end if

End Function

Sub blankStr() str=text1.value if(trim(str)="")

then

msgbox "Please enter a number"

exit sub end if

if(IsPalindrome(str))then msgbox "Yes"

else

msgbox "No"

end if

End Sub


Related Discussions:- Check whether a number is palindrome or not

Insertion and deletion in algorithm, translate''Q''for insert into element ...

translate''Q''for insert into element and''Q''delete for deletion element into programming language

Software that is rude - basics of gui design, Software That Is Rude: T...

Software That Is Rude: The software warns the user for making the mistakes. The Message boxes pop up representing the mistake and the user will have to click the OK or CANCEL

Vbscript dictionary object properties, Just like normal objects Dictionary ...

Just like normal objects Dictionary object also has definite properties. These properties can be set to any valid value & can be retrieved as and while required. Pr

Dictionary object in vbscript, The Dictionary object stores data as key, it...

The Dictionary object stores data as key, item pairs. A Dictionary object is the corresponding of a PERL associative array. Items, that can be any form of data, are stored in the a

Illustration of ccolordialog, ILLUSTRATION OF CCOLORDIALOG The construc...

ILLUSTRATION OF CCOLORDIALOG The constructor of the CColorDialog takes the initial parameter as the default color and the next parameter specifies how much the dialog is displa

Application to count the number of possible triangles, A triangle is equila...

A triangle is equilateral if all three sides are equal, isosceles if any two (but no more than two) sides are equal, and scalene if no two sides are equal. A triangle will be input

Coding, Write an event procedure to automate the billing system of a superm...

Write an event procedure to automate the billing system of a supermarket. Give the details of database tables, forms, controls and menu design (if any). Make assumptions, wherever

Account Balance, The user has to enter a starting balance, the dollar amoun...

The user has to enter a starting balance, the dollar amount of deposits, and the dollar amount of withdrawals. the program then has to calculate the balance

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd