Write a java application that prints all even numbers from 2 to 50 with the aid of following specifiatiions start a new line after every multiple of 20 use for loop.
1
Expert's answer
2011-05-16T11:36:29-0400
class Evens { & public static void main(String[] args) & { int i=2; int a=2; while (i<=50) { & System.out.print(i+" "); & i+=2; & a+=2; & if (a>20) & { & System.out.println(); & a=2; & }; }; };
Numbers and figures are an essential part of our world, necessary for almost everything we do every day. As important…
APPROVED BY CLIENTS
Finding a professional expert in "partial differential equations" in the advanced level is difficult.
You can find this expert in "Assignmentexpert.com" with confidence.
Exceptional experts! I appreciate your help. God bless you!
Comments
Leave a comment