Write 3 different ways of increasing A by 1 write value val
Write 3 different ways of increasing A by 1 write value = value/5 in a shorter form what is the import command needed to use scanner? Use for statement and additional coding to print out each for the following Do not write the entire program, only the for loop 1 3 5 7 9 11 R P N L J H F D S R P N L J H F F D B 1 + 3 = 4 1 + 5 = 6 1 + 7 = 8 1 + 9 = 10
Solution
question 1:
A = A + 1;
A += 1;
A++;
++A;
Question B)
value /= 5;
Question C)
import java.util.Scanner;
Question 2.a)
for(int i = 1 ; i <= 11 ; i+= 2)
{
System.out.print(i+ \" \");
}
Question 2.b)
for(char i = \'R\' ; i >= \'A\' ; i-= 2)
{
System.out.print(i+ \" \");
}
Question 2.c)
for(char i = \'R\' ; i >= \'F\' ; i-= 2)
{
System.out.print(i+ \" \");
}
for(char i = \'F\' ; i >= \'A\' ; i-= 2)
{
System.out.print(i+ \" \");
}
Question 2.d)
for(int i = 3 ; i <= 10 ; i+= 2)
{
System.out.print(\"1 + \"+i+ \" = \" + (1+i) + \" \");
}
