3. Write the while loop to print the following series:
100,98,96,...2
Answers
Answered by
0
Answer:
import java.util.*;
public class Main
{
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
int i=100;
while(i>0)
{
if(i%2==0)
{
System.out.print(i+",");
}
i--;
}
}
}
Explanation:
it is a java program
Attachments:
Similar questions