Write a C# statement or a set of C# statements to accomplish each of the following tasks:
Question:
Write a C# statement or a set of C# statements to accomplish each of the following tasks:
a) Sum the odd integers between 1 and 99, using a for statement. Assume that the integer variables sum and count have been declared.
b) Calculate the value of 2.5 raised to the power of 3, using the Pow method.
c) Display the integers from 1 to 20 using a while loop and the counter variable i. Assume that the variable i has been declared, but not initialized. Display only five integers per line.
d) Repeat part (c), using a for statement.
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Related Book For
Question Posted: