This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Quantity days in a year | |
*/ | |
import java.io.*; | |
public class Solution { | |
public static void main(String[] args) throws Exception { | |
BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); | |
System.out.print("Enter any year: "); | |
int x = Integer.parseInt(br.readLine()); | |
String s = "Quantity days in this year: 36"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
public class Solution { | |
public static void main(String[] args) { | |
Scanner s = new Scanner(System.in); | |
System.out.print("Enter any number seconds: "); | |
int n = s.nextInt(); // entering the any whole number | |
System.out.println("We have " + getCountSecondsPassedInCurrentHour(n) + " seconds of the last hour."); // call of function with the value | |
System.out.println("And it`s exactly: " + n / 3600 + " hours and " + n % 3600 + " seconds."); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void Base (int a){ // The creating of the function: printing string ever 10 values. | |
for (int i = 1; i < 11; i++){ // The declaring of the cycle calculation of string values have been multiplying on the one particular number. | |
System.out.print(a * i + " "); // The printing of the result multiplication with a space. | |
} | |
} | |
public static void main(String[] args) { | |
int y = 1; | |
for (int x = 1; x < 11; x++){ | |
Base(y); // Call the function |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.javarush.task.task04.task0427; | |
/* | |
Описываем числа | |
*/ | |
import java.io.*; | |
public class IdentificationTypeOfNumber { | |
private static void findCapacity(short x){ | |
if(x > 0 && x < 10) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class CanvasOfLetters { | |
private static String whileCycle(String s){ | |
int a = 1; | |
while (a < 10) {//The creating of row containing 10 letters "S" | |
System.out.print(s); | |
a++; | |
}return s; | |
} | |
public static void main(String[] args) throws Exception { | |
int a = 1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.javarush.task.task05.task0529; | |
/* | |
Консоль-копилка | |
*/ | |
import java.io.*; | |
public class StopWordSum { | |
public static void main(String[] args) throws Exception {//напишите тут ваш код | |
BufferedReader r = new BufferedReader(new InputStreamReader(System.in)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.javarush.task.task07.task0708; | |
import java.io.*; | |
import java.util.ArrayList; | |
/* | |
Самая длинная строка | |
*/ | |
public class LongestString { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.javarush.task.task10.task1004; | |
/* | |
Задача №4 на преобразование целых типов | |
*/ | |
public class ConversionOfIntegers { | |
public static void main(String[] args) { | |
short number = 9; | |
char zero = '0'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.javarush.task.task09.task0921; | |
import java.io.BufferedReader; | |
import java.io.InputStreamReader; | |
import java.util.*; | |
/* | |
Метод в try..catch | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.javarush.task.task08.task0814; | |
import java.util.HashSet; | |
import java.util.Iterator; | |
/* OPTION 2 | |
Больше 10? Вы нам не подходите | |
*/ |
OlderNewer