Run
Download
Editor size
0.50
Horizontal view
Dark theme
<!DOCTYPE html> <html lang="en"> <head> <title>HTML Document Template</title> </head> <body> <p>Hello, world!</p> <a href="https://bio-server-courses.netlify.app" target="_blank"><h1>BIO-SERVER Courses</h1></a> <!-- import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); String kiruvchi = scanner.nextLine(); String[] input = kiruvchi.split(" "); String input1 = input[0]; char harf = input1.charAt(0); int harf1; if (harf == 'a') { harf1 = 11; } else if (harf == 'b') { harf1 = 12; } else if (harf == 'c') { harf1 = 13; } else if (harf == 'd') { harf1 = 14; } else if (harf == 'f') { harf1 = 15; } else if (harf == 'g') { harf1 = 16; } else if (harf == 'h') { harf1 = 17; } else { harf1 = 18; } int son = Integer.parseInt(input1.substring(1)); String input2 = input[1]; char harf2 = input2.charAt(0); int harf4; if (harf2 == 'a') { harf4 = 11; } else if (harf2 == 'b') { harf4 = 12; } else if (harf2 == 'c') { harf4 = 13; } else if (harf2 == 'd') { harf4 = 14; } else if (harf2 == 'f') { harf4 = 15; } else if (harf2 == 'g') { harf4 = 16; } else if (harf2 == 'h') { harf4 = 17; } else { harf4 = 18; } int son2 = Integer.parseInt(input2.substring(1)); int harflar_orasidagi_interval = ((Math.max(harf1, harf4) - Math.min(harf1, harf4)) + 1) / 2; int sonlar_orasidagi_interval = ((Math.max(son, son2) - Math.min(son, son2)) + 1) / 2; System.out.println(Math.max(harflar_orasidagi_interval, sonlar_orasidagi_interval)); } } ----------------------------- import java.util.*; import java.io.*; public class Main { public static void main(String[] args) { Scanner in=new Scanner (System.in); PrintWriter out = new PrintWriter(System.out); long a = in.nextLong(); double b = 0; int num[]=new int[(int) a]; int average=0; int i=0; int sum=0; for (i=0;i<num.length;i++) { num[i]=in.nextInt(); sum=num[i]%2; if (num[i]%2==0){ System.out.println(1); }else{ System.out.println(0); } } out.flush(); } } import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); double a, num1, num2; a = scanner.nextDouble(); num1 = a + 273.15; num2 = a * 1.80 + 32.00; System.out.printf("%.5f\n", num1); System.out.printf("%.5f\n", num2); } } ------------------------- import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int n = scanner.nextInt(); int m = 2 * n - 1; for (int i = 0; i < m; i++) { for (int j = 0; j < m; j++) { System.out.print(Math.min(Math.abs(i - (n - 1)), Math.abs(j - (n - 1))) + 1 + " "); } System.out.println(); } } } --------------------------------- import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int n = scanner.nextInt(); int a = scanner.nextInt(); int b = scanner.nextInt(); for (int i = 0; i < n; i++) { int x = scanner.nextInt(); System.out.println(x <= Math.sqrt(a * a + b * b) ? "BOX" : "TRASH"); } scanner.close(); } } ---------------------------------- import java.util.Scanner; public class Main { int count=0; int count_digit(int num){ if(num>0){ if(num%10==0) count++; count_digit(num/10); } return count; } public static void main(String[] args) { Scanner cs=new Scanner(System.in); int n; n=cs.nextInt(); Main ob=new Main(); System.out.print(ob.count_digit(n)); cs.close(); } } ------------------------------ String s = "bobgetbob"; int count = 0; for (int i = 0; i < s.length() - 2; i++) { if (s.charAt(i) == 'b' && s.charAt(i + 1) == 'o' && s.charAt(i + 2) == 'b') { count++; } } System.out.println("Number of 'bobs' is: " + count); -------------------------- String s1 = "Sachin"; String s2 = "Sachin"; String s3 = "Ratan"; System.out.println(s1.compareTo(s2)); // 0 System.out.println(s1.compareTo(s3)); // 1 System.out.println(s3.compareTo(s1)); // -1 ------------------------- String str = "Hello, world!"; int len = str.length(); System.out.println("The length of the string is: " + len); ------------------------- String str1 = "Hello"; String str2 = "World"; if (str1.equals(str2)) { System.out.println("The strings are equal."); } else { System.out.println("The strings are not equal."); } ---------------------------- String str = "apple,banana,orange"; String[] arr = str.split(","); for (String s : arr) { System.out.println(s); } --------------------------- String str = "Hello, world!"; String substr1 = str.substring(7); String substr2 = str.substring(0, 5); System.out.println(substr1); // Output: world! System.out.println(substr2); // Output: Hello --> </body> </html>