Start Designing your Dreams

Else Some one will recruit you to fulfil their Dreams

All vb script examples

Adding digits in numbers in reverse order for every iteration

Post Image

CODE Adding digits in entered numbers in reverse order and printing result at every iteration addition = 0 num = InputBox(“Enter number”) ‘separating for getting individual elements ‘Count = InStr(num, 1) For i = Len(num) To 1 Step -1 separate = Mid(num, i, 1) addition = addition – (-separate) MsgBox addition Next OUTPUT

Read More

Dividing digits in entered numbers & printing result at every iteration

Post Image

CODE Dividing digits in entered numbers and printing result at every iteration num = InputBox(“Enter number”) ‘separating for getting individual elements ‘Count = InStr(num, 1) For i = 1 To Len(num) separate = Mid(num, i, 1) If (separate) = 0 Then division = “Division Not Possible if 0 is one of the digit” Exit For […]

Read More

Multiplying digits in entered numbers & printing result at every iteration

Post Image

CODE Multiplying digits in entered numbers and printing result at every iteration multiplication = 1 num = InputBox(“Enter number”) ‘separating for getting individual elements ‘Count = InStr(num, 1) For i = 1 To Len(num) separate = Mid(num, i, 1) If (separate) = 0 Then multiplication = 0 Else multiplication = multiplication * (separate) End If […]

Read More

Subtracting Digits in entered numbers & printing result at every iteration

Post Image

CODE Subtracting Digits in entered numbers and printing result at every iteration subtract = 0 num = InputBox(“Enter number”) ‘separating for getting individual elements ‘Count = InStr(num, 1) For i = 1 To Len(num) separate = Mid(num, i, 1) subtract = subtract – (separate) MsgBox subtract Next OUTPUT

Read More

Adding digits in entered numbers & print result at every iteration

Post Image

CODE Adding digits in entered numbers and printing result at every iteration addition = 0 num = InputBox(“Enter number”) ‘separating for getting individual elements ‘Count = InStr(num, 1) For i = 1 To Len(num) separate = Mid(num, i, 1) addition = addition – (-separate) MsgBox addition Next OUTPUT

Read More

Dividing digits in entered numbers

Post Image

CODE Dividing digits in entered numbers num = InputBox(“Enter number”) ‘separating for getting individual elements ‘Count = InStr(num, 1) For i = 1 To Len(num) separate = Mid(num, i, 1) If (separate) = 0 Then division = “Division Not Possible if 0 is one of the digit” Exit For Else If Len(division) = 0 Then […]

Read More

Multiplication digits in entered numbers

Post Image

CODE multiplication digits in entered numbers multiplication = 1 num = InputBox(“Enter number”) ‘separating for getting individual elements ‘Count = InStr(num, 1) For i = 1 To Len(num) separate = Mid(num, i, 1) If (separate) = 0 Then multiplication = 0 Else multiplication = multiplication * (separate) End If Next MsgBox multiplication OUTPUT Multiplication:5*9*8*6 will […]

Read More

Subtracting digits in entered numbers

Post Image

CODE Subtracting digits in entered numbers subtraction = 0 num = InputBox(“Enter number”) ‘separating for getting individual elements ‘Count = InStr(num, 1) For i = 1 To Len(num) separate = Mid(num, i, 1) subtraction = subtraction – (separate) Next MsgBox subtraction OUTPUT

Read More

Adding digits in entered numbers

Post Image

CODE Adding digits in entered numbers addition = 0 num = InputBox(“Enter number”) ‘separating for getting individual elements ‘Count = InStr(num, 1) For i = 1 To Len(num) separate = Mid(num, i, 1) addition = addition – (-separate) Next MsgBox addition OUTPUT 5+9+8+6 will give

Read More

Finding smallest digit in n entered numbers

Post Image

CODE Finding smallest digit in n entered numbers smallest = “a” ‘Some alphabet value to misguide the operation numbers = CInt(InputBox(“Enter number:”)) For i = 1 To Len(numbers) num = Mid(numbers, i, 1) If (num < smallest) Then smallest = num Else smallest = smallest End If Next MsgBox "smallest number is:" & smallest OUTPUT

Read More