Monday, March 25, 2013

E-Marketing

For the E-Marketing  and making a normal Excel dynamic doc. using the Office word 2007 or 2013 base personnel...



(a)          1+2+3+………. +N, where N is input and N > 1. For Number count...

Dim i, n1 As Integer
Dim sum As Integer = 0
n1 = TextBox1.Text
For i = 1 To n1
sum = sum + i
Next i
MsgBox(sum)

#####################################################

(b)          1+3+5+………..+ (2N+1), where N is input and N > 0. Performance maintain at customer...

Dim i, n1 As Integer
Dim sum As Integer = 0
n1 = TextBox1.Text
For i = 1 To n1
sum = sum + i
i = i + 1
Next i
MsgBox(sum)

#####################################################

(c)           2+4+6+………..+ (2N), where N is input and N > 1. Territory performance maintenance...

Dim i, n1 As Integer
Dim sum As Integer = 0
n1 = TextBox1.Text
For i = 2 To n1
sum = sum + i
i = i + 1
Next i
MsgBox(sum)

#####################################################

(d)          52+102+152+……. + (5N) 2, where N is input and N > 1. Maintain performance...

Dim i, n1 As Integer
Dim sum As Integer = 0
n1 = TextBox1.Text
For i = 0 To n1
sum = sum + (i * 5) ^ 2
Next i
MsgBox(sum)

#####################################################

2.  Calculate the average of numbers within a range. (For example, average of numbers from 1 to 100). The range will be given as input.

Dim i, n1, n2 As Integer
Dim sum As Integer = 0
Dim avg As Decimal
n1 = TextBox1.Text
n2 = TextBox2.Text
For i = n1 To n2
sum = sum + i
Next i
avg = sum / ((n2 - n1) + 1)
MsgBox(avg)

#####################################################

3. Calculate the total number of evens or odds within a range of numbers (for example, the total number of evens or odds from 3 to 30). The range will be given as input

Dim i, n1, n2 As Integer
Dim counter As Integer = 0
n1 = TextBox1.Text
n2 = TextBox2.Text
For i = n1 To n2
counter = counter + 1
i = i + 1
Next i
MsgBox(counter)

#####################################################

4. Calculate the factorial of a given number.

Dim i, n1 As Integer
Dim counter As Integer = 1
n1 = TextBox1.Text
For i = 1 To n1
counter = counter * i
Next i
MsgBox(counter)

No comments:

Post a Comment