Starting from:
$21.99

$15.99

TCOs Solution



1. (TCOS 5, 6) Which of the following statements correctly updates the accumulator variable named sum? (Points : 3)
       A. sum = 0B. sum = sum + 1
C.sum = sum + x
D. Not enough information given 



Question 4.4. (TCOs 5, 6, 8) What is the output of the following C# code?


            int x, y;
            x = 5;
            while (x <= 9)
            {
                y = 1;
                while (y < 3)
                {
                    Console.Write(x);
                    y = y + 1;
                }
                Console.WriteLine();
                x = x + 2;
            } (Points : 5)
       A. 5 7 9B. 22    44
    66C. 12
D. 55   77
   99
 

Question 5.

5. (TCOs 5, 6, 8) Write the C# code to for the following problem.
Declare an array to store five values; they could be decimal numbers.
Prompt the user to store values into the array.
Then prompt the user for a percent to decrease each value of the array.
Adjust the values and print the new values. Make sure you actually change the values in the array.
The output should look like this (note that it should work for any values that are input, these are just examples). You must use loop(s) to process the array.


Enter number: 10
Enter number: 20
Enter number: 30
Enter number: 40
Enter number: 50
Enter percent decrease: 5
After a 5 percent decrease the values are
9.5
19
28.5
38
47.5
Press any key to continue . . . 
 

More products