write a program in Java to print the square of even number till the limit entered by the user
Answers
Answered by
0
Answer:
In this tutorial, we will write a Java program to display even numbers from 1 to n which means if the value of n is 100 then this program will display the even values between 1 to 100.
Answered by
2
public class Square {
public static void main(int limit) {
for(int a=2; a<=limit; a++){
if(a℅2==0)
System.out.println(a*a);
}
}
}
.
.
.
.
HOPE THIS HELPS YOU
.
.
.
.
PLEASE MARK AS BRAINLIEST AND FOLLOW ME TOO
Similar questions
Math,
2 months ago
Business Studies,
2 months ago
Math,
4 months ago
English,
4 months ago
Math,
9 months ago