Skip to content

Instantly share code, notes, and snippets.

View Sergaav's full-sized avatar

Andrii Serha Sergaav

View GitHub Profile
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module-library" scope="TEST">
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module-library" scope="TEST">
@Sergaav
Sergaav / Foursquare.java
Created April 23, 2015 13:52
Наследование фигуры
public class Foursquare extends Shape {
private Point A;
private Point B;
private Point C;
private Point D;
public Foursquare(Point a, Point b, Point c, Point d) {
package com.gmail.sergaav.dz7_1;
import java.io.*;
import java.util.Scanner;
public class dz7_1 {
public static void main(String[] args) throws FileNotFoundException {
File ff = new File("file.txt");
package com.gmail.sergaav.dz4_3;
import java.util.Scanner;
import java.util.Arrays;
public class dz4_3 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
System.out.println("How much money do you have?");
String n;
package com.gmail.sergaav.dz4_2;
import java.util.Scanner;
import java.util.Random;
public class dz4_2 {
public static void main(String[] args) {
System.out.println("Input massive length: ");
Scanner sc = new Scanner(System.in);
package com.gmail.sergaav.dz4_1;
public class dz4_1 {
public static void main(String[] args) {
int[][] mas = { { 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 0 }, { 1, 1, 1, 1, 1, 1 },
{ 1, 1, 1, 1, 1, 1 }, { 1, 1, 1, 1, 1, 1 }, };
System.out.println("Заданный массив: \n ");
for (int i = 0; i < mas.length; i++) {
@Sergaav
Sergaav / dz3_5.java
Created March 26, 2015 13:46
Factorial 4<n<16
package com.gmail.sergaav.dz3_5;
import java.util.Scanner;
public class dz3_5 {
public static void main(String[] args) {
double n;
double fact=1;
int i;
Scanner sc = new Scanner (System.in);
System.out.println("Input a:");
@Sergaav
Sergaav / dz3_4.java
Created March 26, 2015 13:45
Figure with *
package com.gmail.sergaav.dz3_4;
import java.util.Scanner;
public class dz3_4 {
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
int i=0;
int j=0;
int n;
System.out.println("Input length:");
@Sergaav
Sergaav / dz3_3.java
Created March 26, 2015 13:44
Triangle and point (x,y)
package com.gmail.sergaav.dz3_3;
import java.util.Scanner;
public class dz3_3 {
public static void main(String[] args) {
double x;
double y;