using UnityEngine;
using System.Collections;
public class ExSwitch1 : MonoBehaviour {
// Use this for initialization
void Start () {
int i =0;
int[] Score = new int[] {40, 50,100, 90, 77, 89, 64} ;
for(i = 0; i < Score.Length; i++)
{
if(90 <= Score[i]){
print("A");
}
else if(80 <= Score[i] && Score[i] < 90){
print ("B");
}
else if(70 <= Score[i] && Score[i] < 80){
print ("C");
}
else if(60 <= Score[i] && Score[i] < 70){
print ("D");
}
else{
print ("F");
}
}
}
// Update is called once per frame
void Update () {
}
}
'Computer Language > 유니티' 카테고리의 다른 글
나라 출력 (0) | 2014.04.07 |
---|---|
정수값을 입력받고 문자로 치환해서 성적 구하기.(배열 if switch) (0) | 2014.04.07 |
핀볼게임 (0) | 2014.04.05 |
중복된것 빼기 허허 슬퍼요 (0) | 2014.04.05 |
배열 복사 (0) | 2014.04.05 |