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.


```
a.
sum = 0;
for (count = 1; count <= 99; count += 2)
{
sum += count
}
b.
double result = Math.Pow(2.5, 3);
```

Computer Science & Information Technology

You might also like to view...

A ________ is a simplified version of a function used to test the main program.

What will be an ideal response?

Computer Science & Information Technology

Declare a stack template container to hold values of type double using the default container.

What will be an ideal response?

Computer Science & Information Technology

The most common home network is a ________

A) client/server network B) token ring LAN C) peer-to-peer network (P2P) D) WAN

Computer Science & Information Technology

Both the echo() and print() statements send data to an input stream.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology