Skip to content

Commit cfe721d

Browse files
substring
1 parent 40bd165 commit cfe721d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

easyq/src/easyq/splitL.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
*
33
*/
44
package easyq;
5-
5+
import java.util.*;
66
/**
77
* @author M.NAVEEN
88
* RANDOM CODER'S
@@ -15,7 +15,7 @@ public static void main(String[] args)
1515
{
1616

1717
String str="JavaISBALA";
18-
int n=4;
18+
int n= new Scanner(System.in).nextInt();
1919
for(int i=0;i<str.length();i=i+n) {
2020
if(i+n<str.length())
2121
System.out.println(str.substring(i, i+n));

0 commit comments

Comments
 (0)