Skip to content

Commit 6db5863

Browse files
author
Adiganesh005
committed
a
1 parent c8ba7a4 commit 6db5863

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

MissingNumber.java

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
package com.practice.geeks;
2+
3+
import java.util.Scanner;
4+
5+
public class MissingNumber {
6+
7+
public static void main(String[] args) {
8+
// TODO Auto-generated method stub
9+
10+
Scanner sc = new Scanner(System.in);
11+
12+
for(int T = sc.nextInt(); T < 25; T--){
13+
int N = sc.nextInt();
14+
int Arr[] = new int[N-1];
15+
if((N >= 1)&&(N <=10000)){
16+
17+
for(int i = 0; i <= N-1; i++){
18+
if((Arr[i] > 0) && (Arr[i] <= 10000)){
19+
int Arr1[] = new int[N];
20+
for(int j = 0; j <= N; j++){
21+
Arr1[j] = j;
22+
if(Arr[i] != Arr1[j]){
23+
System.out.println(j);
24+
25+
}
26+
}
27+
}
28+
}
29+
30+
}
31+
32+
33+
34+
35+
}
36+
37+
}
38+
39+
}

0 commit comments

Comments
 (0)