- Write a java statement or a set of java statements toaccomplish each of the following tasks:
- Sum the odd integers between 1 and 99, using a for statement.Assume that the integers variables sum and count have beendeclared.
- Calculate the value of 2.5 raised to the power of 3 using thepow method.
- Print the integers from 1 to 20, using the while loop thecounter variable i. Assume that the variable it has been declared,but no initialized. Print only five integers per line. [Hint: Use the calculation i % 5. When the value of thisexpression is 0, print a newline character; otherwise, print a tabcharacter. Assume that this code is an application. UseSystem.out.println(‘t’)method to output the tab character .]
- Repeat part (c), using for statement
- Write a java program that displays a student’s statusbased on the following codes:
Code Student Status
Your program should accept the code number as a user-entered inputvalue and based on this value display the correct student status.If an incorrect code is entered, your program should display thestring “An incorrect code was entered”.
Answer to Write a java statement or a set of java statements to accomplish each of the following tasks: Sum the odd integers betw…