-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLongestRun.java
More file actions
41 lines (28 loc) · 847 Bytes
/
LongestRun.java
File metadata and controls
41 lines (28 loc) · 847 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
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/**
*
* @author USMANULLAH KHAN
*/
public class LongestRun {
public static void main(String[] args){
System.out.println("Enter number");
int count=0;
int x=0;
while(!StdIn.isEmpty()){
x=StdIn.readInt();
count++;
int[] n=new int[count];
for(int i=0;i<n.length;i++){
n[i]=x;
}for(int i=0;i<n.length;i++){ System.out.println(n[i]);
}
//while(!StdIn.isEmpty()){
//for(int i=0;i<n.length;i++){
//}
//for(int i=0;i<n.length;i++){
}
}