-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMy home work
More file actions
52 lines (41 loc) · 738 Bytes
/
Copy pathMy home work
File metadata and controls
52 lines (41 loc) · 738 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
import java.util.*;
class Array1
{
static int size;
static int[] a;
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
System.out.print("Enter the size::>");
size = sc.nextInt();
a = new int[size];
for(int i = 1; i<=size; i++)
{
}
if(size>9)
{
fun1();
System.out.println();
fun2();
}
else
{
System.out.println("Please Enter more than 10");
}
}
public static void fun1()
{
System.out.print("The Number Is::>");
for(int i = size - 4; i>=1; i--)
{
System.out.print(i+" ");
}
}
public static void fun2()
{
System.out.print("The Number Is::>");
for(int i = size-3 ; i<=size; i++)
{
System.out.print(i+" ");
}
}
}