2010/02/10

C# week3_2

if : 2choice

int i = 4;
if(i<0) i =" 10;" j =" 10;">10){
if(j>0){
Console.WriteLine("j is positive");
} else {
Console.WriteLine("j is negative");
}
}

switch : multiple choice

switch()
case
break;

for : loop

int i = 10;
for (i;i<15;i++)
{
Console.WriteLine("Hello");
}

Result: Hello*5

0 件のコメント:

コメントを投稿

UA-9417263-1