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
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
Accountancy,
6 months ago
Psychology,
6 months ago
Hindi,
1 year ago
English,
1 year ago
Geography,
1 year ago