Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Frequency
//'main' method must be in a class 'Rextester'. //Compiler version 1.8.0_111 import java.util.*; import java.lang.*; class Rextester { public static void main(String args[]) { String s,ch; int I,p,q,h,ln,c=0; Scanner sc =new Scanner(System.in); s=sc.nextLine(); ch=sc.next (); p=0; ln=length(); for(i=0;i<ln;i++) { if(s.charAt(i)==" ") { String h=s.substring(p,i); q=h.compareto (s); if(q==0) C++; } } } }
run
|
edit
|
history
|
help
0
Happy Numbers in Java
Speed
Frequecy count hashmap
2b
Factorial using recursion in java
jb12.0 threads.enums
Hi
multiplo de 4 y 6
PE #6
ZonedDateTime testing