Computer Science, asked by vanshika832, 1 year ago

Write a program in Java to store 10 numbers. Display all the negative numbers followed by the positive numbers without changing the order of the numbers​

Answers

Answered by lenkadevajanee
3

Answer:

class Number

{

public static void main(int num)

{

System.out.println("Numbers entered="+num);

switch (num)

{

case 1:

System.out.println("negative number");

break;

........(continue it till case 10)......

default:

System.out.println("Invalid entry");

}

}

}

Similar questions