Computer Applications
Rewrite the following program segment using while instead of for loop.
int f = 1, i;
for(i = 1; i <= 5 ; i++)
{
f *= i;
System.out.println(f);
}
Related Questions
Write the values that will be stored in variables num and sum after execution of the following code.
int sum = 0, num = -2; do { sum = sum + num; num++; } while (num < 1);The following code has some error(s). Rewrite the correct code and underlining all the corrections made.
integer counter = 0; i = 10; num; for (num = i; num >= 1; num--); { If i % num = 0 { counter = counter + 1; } }State the method that
(a) converts a string to a primitive float data type.
(b) determines if the specified character is an uppercase character.