Skip to content

Instantly share code, notes, and snippets.

@mokomokohitsuzi
Created September 30, 2016 13:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mokomokohitsuzi/626e2866a65aacf01b5c4e08e2267240 to your computer and use it in GitHub Desktop.
Save mokomokohitsuzi/626e2866a65aacf01b5c4e08e2267240 to your computer and use it in GitHub Desktop.
新・明解Java入門 演習2-2
int x;
int y;
int z;
x = 63;
y = 18;
z = 20;
System.out.println("xの値は" + x + "です。");
System.out.println("yの値は" + y + "です。");
System.out.println("zの値は" + z + "です。");
System.out.println();
System.out.println("合計は" + (x + y + z) + "です。");
System.out.println("平均は" + (x + y + z) / 3 + "です。");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment