Skip to content

Instantly share code, notes, and snippets.

View stden's full-sized avatar

Denis Stepulenok stden

  • СПбГЭТУ "ЛЭТИ"
  • Saint-Petersburg, Russia
View GitHub Profile
Sub SortingMain()
Dim area As Range, nrOfValues As Long
Set area = Range("A1").CurrentRegion
nrOfValues = area.Cells.Count
Call ShellSort(area, nrOfValues)
End Sub
Sub SortingMain()
Dim area As Range, nrOfValues As Long
Set area = Range("A1").CurrentRegion
nrOfValues = area.Cells.Count
Call ShellSort(area, nrOfValues)
End Sub
Sub SortingMain()
Dim area As Range, nrOfValues As Long
Set area = Range("A1").CurrentRegion
nrOfValues = area.Cells.Count
Call ShellSort(area, nrOfValues)
End Sub
Sub SortingMain()
Dim area As Range, nrOfValues As Long
Set area = Range("A1").CurrentRegion
nrOfValues = area.Cells.Count
Call ShellSort(area, nrOfValues)
End Sub
public class Java1_FirstApplication {
public static void main(String[] args) {
System.out.println("Hello, world!");
int a = 4;
// declaration (объявление)
int b;
// initialization (инициализация - задание значения)
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
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) {
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 используется только внутри этой функции, и пусть она будет внутри её и объявлена
@stden
stden / MainInheritance.java
Created March 21, 2017 17:21
Пример наследования
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),
/*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();