KakaoTalk_20190606_001802318.png
  • 246x0w
Welcome
Curriculum
Install&Go
Board
실제 작동 상태를 확인하려면 라이브 사이트로 이동하세요.
  • 카테고리
  • 전체 게시물
  • 내 게시물
wimpy15
2020년 7월 28일

다음시간에 이해하기

게시판: 소스 코드 제출

/*

import java.util.Scanner;



public class Main


{


public static void main(String[] args)


{


Scanner scanner = new Scanner(System.in);


int i, j = 0, arr[][] = new int [10][10];


int arr1[][] = new int [10][10];


int n = 0, p[][] = new int [8][2];


int k = 0;



for(i = 0; i < 10; i++)


{


for(j = 0; j < 10; j++)


{


arr[i][j] = scanner.nextInt();


arr1[i][j] = arr[i][j];


}


}

n = scanner.nextInt();



for(k = 0; k < n; k++)

{

p[k][0] = scanner.nextInt()-1;

p[k][1] = scanner.nextInt()-1;

}


for(i = 0; i < 10; i++)


{

for(j = 0; j < 10; j++)

{

if(arr[i][j]>=1)

{

for(k = 1; k<=arr[i][j]; k++)

{


if(i+k>9 || arr[i+k][j]==-1)


{


break;


}


arr1[i+k][j]=-2;


}


for(k = 1; k<=arr[i][j]; k++)


{


if(j+k>9 || arr[i][j+k]==-1)


{


break;


}


arr1[i][j+k]=-2;


}


for(k = 1; k<=arr[i][j] ;k++)


{


if(j-k<0 || arr[i][j-k]==-1)


{


break;


}


arr1[i][j-k]=-2;


}


for(k = 1; k<=arr[i][j] ;k++)


{


if(i-k<0 || arr1[i-k][j]==-1 )

{

break;

}

arr1[i-k][j]=-2;

}

arr1[i][j]=-2;

}

}

}


for(k = 0; k<n ; k++)

{

if (arr1[ p[k][0] ][ p[k][1] ] == 0)

{

arr1[ p[k][0] ][ p[k][1] ] = k+1;

}

}


for(i = 0; i < 10; i++)


{

for(j = 0; j < 10; j++)


{

System.out.print(arr1[i][j]+" ");

}


System.out.println();

}

System.out.println("Character Information");

for(k = 0; k < n; k++)

{

if(arr1[ p[k][0] ][ p[k][1] ] > 0)

{

System.out.println("player "+(k+1)+" survive");

}

else

{

System.out.println("player "+(k+1)+" dead");

}

}

}

}

*/


/*

import java.util.Scanner;

public class Main

{

public static void main(String[] args)

{

Tv t1 = new Tv();

Tv t2 = new Tv();

System.out.println("t1의 channel값은 " + t1.channel + "입니다");

System.out.println("t2의 channel값은 " + t2.channel + "입니다");

t1.channel = 7;

System.out.println("t1의 channel값을 7로 변경하였습니다.");

System.out.println("t2의 channel값은 "+ t1.channel + "입니다");

System.out.println("t2의 channel값은 "+ t2.channel + "입니다");

}

}


class Tv {

String color;

int channel;

boolean power;

void power()

{ power = !power;}

void channelUP()

{ channel++; }

void channelDown()

{ channel--; }

}

*/

/*

public class Main

{

public static void main(String[] args) {

System.out.println("Card.width = "+ Card.width);

System.out.println("Card.height ="+ Card.height);

Card c1 = new Card();

c1.kind = "Heart";

c1.number = 7;

Card c2 = new Card();

c2.kind = "Spade";

c2.number = 4;

System.out.println("c1는 " + c1.kind + "," + c1.number +"이며, 크기는(" + c1.width +","+c1.height+")");

System.out.println("c2는 " + c2.kind + "," + c2.number +"이며, 크기는(" + c2.width +","+c2.height+")");

System.out.println("c1의 width와 height를 각각 50, 80으로 변경합니다");

c1.width = 50;

c1.height = 80;

System.out.println("c1는 " + c1.kind + "," + c1.number +"이며, 크기는(" + c1.width +","+c1.height+")");

System.out.println("c2는 " + c2.kind + "," + c2.number +"이며, 크기는(" + c2.width +","+c2.height+")");

}

}


class Card

{

String kind;

int number;

static int width = 100;

static int height = 250;

}

*/


import java.util.*;


class subject {

int a, b, c;

subject() {

a = 10;

b = 20;

c = 30;

System.out.println("Here is Automactlly play");

}

subject(int a, int b, int c) {

this.a = a;

this.b = b;

this.c = c;

System.out.println("WOW");

}

void fuc() {

System.out.println("asdassdasd");

}

}


class math extends subject {

int p, k, z;

}


public class Main {

public static void main(String[] args) {

math m = new math();

}

}













댓글 0개
0
댓글
댓글 0개
유사 게시물
  • 20220814
  • 도박 게임( 절대 사기 아님!)
  • 220824
주소 : 경기도 용인시 광교중앙로 302 블루 스퀘어 602호
연락처 : 031) 216 - 1546
사업자등록번호 : 465-92-00916
​학원 등록 제 4603호