Created
January 6, 2015 14:57
-
-
Save kazuooooo/e69e9bd21c5bf9df455b 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
public class Array : MonoBehaviour { | |
// Use this for initialization | |
void Start () { | |
int[] data = { 98, 76, 63, 38, 8 }; | |
int total; | |
foreach(int n in data){ | |
total += n; | |
} | |
int ave = total/5; | |
guiText.text = "Total:"+total+"ave:"+ave; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment