Last active
August 29, 2015 14:08
-
-
Save mneko22/bb64d0591a3969bf8377 to your computer and use it in GitHub Desktop.
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
import java.util.*; | |
class Test | |
{ | |
public static void main(String[] args) | |
{ | |
//人数分の変数を宣言しなければならない | |
int a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,a16,a17,a18,a19,a20,a21,a22,a23,a24,a25,a26,a27,a28,a29,a30,....,a100; | |
double ave; | |
//テストの点数を代入 | |
a1 = 30; | |
a2 = 45; | |
a3 = 34 | |
a4 = 23; | |
a5 = 34; | |
a6 = 5; | |
a7 = 23; | |
a8 = 34; | |
a9 = 89; | |
a10 = 90; | |
a11 = 74; | |
a12 = 43; | |
a13 = 23; | |
a14 = 23; | |
a15 = 78; | |
a16 = 34; | |
a17 = 78; | |
... | |
a100 = 67; | |
//平均点を求める変数に a1~a100 の点数と人数で割った数を代入 | |
ave = (a1 + a2 + ... a100) / 100; | |
//平均点を表示 | |
System.out.println(ave); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment