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
Sub SortingMain() | |
Dim area As Range, nrOfValues As Long | |
Set area = Range("A1").CurrentRegion | |
nrOfValues = area.Cells.Count | |
Call ShellSort(area, nrOfValues) | |
End Sub |
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
Sub SortingMain() | |
Dim area As Range, nrOfValues As Long | |
Set area = Range("A1").CurrentRegion | |
nrOfValues = area.Cells.Count | |
Call ShellSort(area, nrOfValues) | |
End Sub |
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
Sub SortingMain() | |
Dim area As Range, nrOfValues As Long | |
Set area = Range("A1").CurrentRegion | |
nrOfValues = area.Cells.Count | |
Call ShellSort(area, nrOfValues) | |
End Sub |
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
Sub SortingMain() | |
Dim area As Range, nrOfValues As Long | |
Set area = Range("A1").CurrentRegion | |
nrOfValues = area.Cells.Count | |
Call ShellSort(area, nrOfValues) | |
End Sub |
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 Java1_FirstApplication { | |
public static void main(String[] args) { | |
System.out.println("Hello, world!"); | |
int a = 4; | |
// declaration (объявление) | |
int b; | |
// initialization (инициализация - задание значения) |
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
Sub Start() | |
Dim nrOfValues As Long, first As Long, last As Long | |
Dim xy As Range, max As Long | |
Set xy = Range("A1") | |
first = Range("first").value | |
last = Range("last").value | |
nrOfValues = Range("nr_of_values").value | |
' Clear old values |
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; | |
import static java.lang.Math.min; | |
public class Solution { | |
private static int N; | |
static int[] A; | |
public static void main(String[] args) { |
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 Factorial { | |
public static void main(String[] args) { | |
byte i = enterValue(); // Ввод данных | |
long result = factorial(i); // Вычисления | |
System.out.println(result); // Вывод ответа | |
} | |
private static byte enterValue() { | |
byte i = 0; | |
// Переменная incorrect используется только внутри этой функции, и пусть она будет внутри её и объявлена |
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 shapes; | |
public class Main { | |
public static void main(String[] args) { | |
Shape[] shapes = { | |
new Circle("Окружность", "Красный", 1.0, 2.0, 1.5), | |
new Point("Точка", "Чёрная", 2.3, 3.1), | |
new Square("Квадрат", "Пурпурный", | |
1.0, 2.0, 4.0, 5.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
/*TASK 1*/ | |
/*Write a Java program to check if a number is Armstrong or not ? | |
A number aa is an Armstrong Number or narcissistic number if it is equal to the sum of its own digits raised to the power of the number of digits.*/ | |
import java.util.Scanner; | |
public class ArmstrongOrNot { | |
static boolean isArmstrong(int N){ | |
String asStr = "" + N; | |
int numberOfDigits = asStr.length(); |
NewerOlder