using System;
class sample
{
public static void Main()
{
int score = 0;
string word;
Console.WriteLine("Enter a word ->");
word = Console.ReadLine();
for (int i = 0; i < word.Length; i++)
{
switch(word[i])
{
case () : score += 1;
}
/*
if (word[i] == 'a')
score += 1;
if (word[i] == 'b')
score += 2;
if (word[i] == 'c')
score += 3;*/
}
Console.WriteLine("The score is {0}", score);
}
}
저기 케이스괄호안에 뭘써야되는지 모르겟어요 ...
이것저것 다넣어봐도 오류뜨는딩 ㅜㅜ
댓글 0