Computer Science, asked by vedikasparanjape, 5 months ago

Write the following Java programs .(Attempt any 2/4) ( 2*5 )
i. To display product of 5 to 10 numbers.
iii. To find the even numbers from 25 to 50.
iv. To display a series as given in bracket [1,4,9,16.......] till 10 counts.
v. To accepts 3 numbers and find the largest of them.
pls pls pls answer pleaseeee

Answers

Answered by ktr1705
0

Answer:

2. MAIN CODE :

import java.util.*;

public class Even_series

{

   public static void main (String[]args) {

       Scanner sc = new Scanner (System.in);

       System.out.println("The even number are :");

       int num = 50

       for (int i = 25; i <= num; i++) {

           i = i + 1;

           System.out.print(i + " ");

       }

   }

}

3. MAIN CODE :

import java.util.*;

public class Even_series

{

   public static void main (String[]args) {

       Scanner sc = new Scanner (System.in);

       System.out.println("Series :");

       int num = 10;

       for (int i = 1; i <= num; i++) {

           double ans = Math.pow(i, 2);

           System.out.print((int)ans + " ");

       }

   }

}

-------------------------------

For more doubts in computers and programming, follow me to get the best explanations at the topic!

Please mark my answer as the brainliest and rate it a 5 star. It would mean a lot to me !!

Similar questions