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
#include<stdio.h> | |
int main(){ | |
printf("hello world"); | |
return 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
public class Sudoku{ | |
private int[][] field = | |
{ | |
{3,6,0,8,9,0,0,0,2}, | |
{9,0,0,0,5,2,3,0,0}, | |
{7,0,0,0,0,1,9,8,4}, | |
{8,0,0,2,4,0,0,0,6}, | |
{2,5,3,0,7,6,0,9,8}, | |
{0,0,6,0,0,0,0,0,0}, | |
{0,0,7,5,0,8,0,0,9}, |
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 StringTest | |
{ | |
public static void main(String[] args) | |
{ | |
String a = "Java "; | |
String b = "Programming"; | |
String c = a+b; | |
System.out.println(a); | |
System.out.println(b); |
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 StringTest2 | |
{ | |
public static void main(String[] args) | |
{ | |
String a = "Java "; | |
int b = 1; | |
int c = 2; | |
String d = a + b + c; | |
String e = a + (b + c); |
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 StringTest3 | |
{ | |
public static void main(String[] args) | |
{ | |
String a = "Java "; | |
for(int i=0; i<100; i++) | |
{ | |
a = a + i; | |
System.out.println(a); |
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 Enzan | |
{ | |
public static void main(String[] args) | |
{ | |
int a = Integer.parseInt(args[0]); //数文字→数値へ返還する | |
int b = Integer.parseInt(args[1]); //Integer.parseInt("数文字") | |
System.out.println("a="+a); | |
System.out.println("b="+b); | |
} |
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 Enzan | |
{ | |
public static void main(String[] args) | |
{ | |
int a = Integer.parseInt(args[0]); | |
int b = Integer.parseInt(args[1]); | |
System.out.println("a="+a); | |
System.out.println("b="+b); |
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 Enc | |
{ | |
public static void main(String[] args) | |
{ | |
int data = Integer.parseInt(args[0]); | |
int key1 = Integer.parseInt(args[1]); | |
int key2 = Integer.parseInt(args[2]); | |
int enc = data ^ key1; | |
System.out.println("encode=>"+enc); |
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
/** | |
* 1~12月の最大日を表示する。 | |
* | |
* @auther M.Horikawa | |
*/ | |
public class LastDay | |
{ | |
public static void main(String[] args) | |
{ | |
int a = Integer.parseInt(args[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
class Character | |
attr_accessor :hp, :mp, :name | |
def initialize(name) | |
@hp = 100 | |
@mp = 100 | |
@name = name | |
end | |
def attack(enemy) # enemy<敵> |
OlderNewer