We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c8ba7a4 commit 6db5863Copy full SHA for 6db5863
MissingNumber.java
@@ -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