[프로그래머스 | C# | Lv.0] 커피 심부름

728x90

https://school.programmers.co.kr/learn/courses/30/lessons/181837

 

📝 나의 풀이

using System;

public class Solution {
    public int solution(string[] order) {
        int answer = 0;
        
        for(int i=0; i<order.Length; i++){
            if(order[i].Contains("latte")) answer +=5000;
            else answer +=4500;
        }
        return answer;
    }
}
728x90