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 HelloWorld{ | |
public static void main(String[] args){ | |
System.out.println("HelloWorld"); | |
} | |
} |
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 Ryougae{ | |
public static void main(String[] args){ | |
int en = Integer.parseInt(System.console().readLine("日本円=")); | |
if(en<117){ | |
System.out.println("換算できないよ!"); | |
return; | |
} | |
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
ディジタルコンテンツ研究愛好会 | |
【活動内容】 | |
・ディジタルコンテンツ(ゲーム・動画・音楽・アプリ)作ろうぜ。 | |
・一週間に一度ぐらいはゲームとかして遊ぼうぜ | |
【募集要項】 | |
・プログラミングに興味のある方(他学部他学科ok) | |
・コンテンツを作りたい方(HIKAKIN目指すのもアリ | |
【活動指針】 | |
・コミケ出展を目標に活動する。 | |
・生産と勉強の両立をモットーとする。生産だけに走らず、勉強だけに走らず。 |
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
cmd /k cd /d %~dp0 |
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 DrawCircle{ | |
public static void main(String[] args){ | |
int hankei = 10; //ここ可変 | |
for(int i = 0; i < hankei*2+1; i ++){ | |
for(int j = 0; j < hankei*2+1; j ++){ | |
System.out.print(" "); //windowsでは行間がひろいためスペーサーが必要 | |
if( (hankei-i)*(hankei-i)+(hankei-j)*(hankei-j) < hankei*hankei){ | |
System.out.print("*"); | |
}else{ | |
System.out.print(" "); |
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 Akeome{ | |
public static void main(String args[]){ | |
String akeomeCheck = ""; | |
String akeome[] = {"あ","け","お","め"}; | |
int count = 0; | |
String moji = ""; | |
System.out.print("\n\n"); | |
while(!akeomeCheck.equals("あけおめ")){ | |
moji = akeome[(int)(Math.random()*4)]; | |
System.out.print(moji); |
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 GoldenMean { | |
public static void main (String[] args) { | |
int a = 1; | |
int b = 1; | |
int c; | |
for(int i = 0; i < 30; i++){ | |
System.out.println(i+"\ta="+a+"\tb="+b+"\tb/a="+((double)b/a)); | |
c = a + b; | |
a = b; | |
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 CommonDivisor{ | |
public static void main(String[] args){ | |
System.out.println("\tx\ty\tr"); | |
int x = Integer.parseInt(args[0]); | |
int y = Integer.parseInt(args[1]); | |
int r = x % y; | |
System.out.println("\t"+x+"\t"+y+"\t"+r); | |
while(r!=0){ | |
x = y; | |
y = r; |
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 PhotoBooth{ | |
public static void main(String[] args){ | |
System.out.println("【プリクラ問題】"); | |
System.out.println("n人のメンバーが"); | |
System.out.println("m人は入れるプリクラで"); | |
System.out.println("それぞれが他の各メンバーと"); | |
System.out.println("同じ写真に収まるには"); | |
System.out.println("何回の撮影が必要か\n"); | |
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 FizzBuzz{ | |
public static void main(String[] args){ | |
int n = Integer.parseInt(System.console().readLine("いくつまでやりますか? ")); | |
for(int i = 1; i <= n ;i++ ){ | |
if(i%3==0) | |
System.out.print("Fizz"); | |
if(i%5==0) | |
System.out.print("Buzz"); | |
if(i%3!=0 && i%5!=0) | |
System.out.print(i); |
OlderNewer