3) Write a Java statement to accomplish each of the following tasks:
a) Declare variables sum and x to be of type int.
c) Assign 1 to variable x.
d) Assign 0 to variable sum.
e) Add variable x to sum, and assign the result to variable sum.
f) Print “The sum is: “, followed by the value of variable sum.
4) Combine the statements that you wrote into a Java application that calculates and prints the sum of integer from 1 to 10. Use the while loop through the calculation and increment statements. The loop should terminate when the value of x become 11.
56 freelancers estão ofertando em média $17 para esse trabalho
Hi, I am a Java developer having 4+ years of experience. I have read the description of your project and understood it. I assure you quality work, on-time delivery. Thanks