Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
JAVA # Klavyeden Girilen cümlelerin en uzununu bulma
//'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[]) { Scanner k=new Scanner(System.in); String c1=k.nextLine(); String c2=k.nextLine(); String c3=k.nextLine(); int cu1=c1.length(); int cu2=c2.length(); int cu3=c3.length(); int yaz=cu1; String ey=c1; if(yaz<cu2){yaz=cu2;ey=c2;} if(yaz<cu3){yaz=cu3;ey=c3;} System.out.print("En Uzun kelime = "+ey); } }
run
|
edit
|
history
|
help
0
Alphabets
Catalan number optimised
calc
3.B
Minimum Vertices to Traverse Directed Graph
Edna Garcia
OBF-7 3
strstr() function / indexOf() function
Quadratic equation
pow x^n