Friday, March 1, 2013

Vbs :Count no of Commas in a string

Vbs :Count no of Commas in a string

Program to count no of commas in a string

n=inputbox("enetr a string containing commas")

for i=1 to len(n)
 k=mid(n,i,1)

 if k="," then
  RES=RES+1
 END IF
next

msgbox "no of commas="& RES

No comments:

Post a Comment