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
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
/* | |
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
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
package com.javarush.task.task04.task0428; | |
/* Положительное число */ | |
import java.io.*; | |
public class findPositiveInteger { | |
public static void main(String[] args) throws Exception { | |
BufferedReader r = new BufferedReader(new InputStreamReader(System.in)); | |
int[] a = new int[3]; int i, j = 0; | |
for(i = 0; i < 3; i++)//creating 3 elements of array | |
a[i] = Integer.parseInt(r.readLine()); | |
for(i = 0; i < 3; i++) |
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.task04.task0434; | |
/* | |
Таблица умножения | |
*/ | |
public class multiplicationTable { | |
private static String multiplication(int s){ | |
int a = 1, g = 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.task04.task0441; | |
/* | |
Как-то средненько | |
*/ | |
import java.io.*; | |
public class FindMiddleValue { | |
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.task04.task0442; | |
/* | |
Суммирование. Summing junction. | |
*/ | |
import java.io.*; | |
public class SummingJunction { | |
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.task04.task0437; | |
/* | |
Треугольник из восьмерок | |
*/ | |
public class TriangleOfEights { | |
public static void main(String[] args){String a = "8", b = "8"; | |
for (; true;) {//this empty cycle for Verificator JavaRush only |
OlderNewer