Menu
support@authoritypapers.com
+1(805) 568 7317

this is all in virtual studio 2015 in c loops and arrays declare variables dblprice 5196299

THIS IS ALL IN VIRTUAL STUDIO 2015 in C#. LOOPS AND ARRAYS

Declare variables, dblPrice and dblTotal as double data type.

Declare a variable, intCount, as integer data type to use as a counter variable.   

Convert the input in txtPrice to double data type and assign it to the variable, dblPrice.

Define a for loop to calculate and display dblPrice * intCount, where intCount is the quantity of 0-10.

      For each iteration of the loop:

Multiply dblPrice by intCount and assign the result to dblTotal.

In the lstMultiply listBox, display dblPrice * intCount = dblTotal

Example:

5 * 0 = 0

5 * 1 = 5

:

5*10 = 50

      c.   In the btnArray click event procedure:

Declare variables named dblPrice and dblTotal as double data type.

An array named dblQuantities was declared for you and was assigned initial values.

Convert the input in txtPrice to double data type and assign it to the variable, dblPrice.

Write a foreach loop to multiply each element of the array, dblQuantities, by dblPrice.

For each iteration of the loop:

Multiply the array element by dblPrice and assign the product to dblTotal.

Write the equation and result in the listbox, lstMultiply (like part b.)

"Order a similar paper and get 15% discount on your first order with us
Use the following coupon
"GET15"

Order Now