Re: console application help
So, we don't usually do homework for people here, but it seems to me that you would simply check for the numbers '5' and '18' and not print them...
Re: console application help
hi thanx for reply. All i need just a hint how to do it as i stuck. the program should output (as i understand it) numbers in a row 1-till 20 excluding 5 and 18.
Re: console application help
ok, so...
Code:
for ( int i = 1; i < 21; ++i )
{
if ( i != 5 && i != 18 )
{
Console.WriteLine( i );
}
}
Re: console application help
aaaaaaaa!! Thank you!! (grrr! so easy!)
i study it 1st month as i am 1st year student. Sorry to bother you. I will try to find some other forum for the beginners. Thanx again!
Re: console application help
It's ok, you don't have to find another forum. We are glad to help students with their homework, we just prefer not to hand them an answer. Next time, just post some code which shows what you have already tried, tell us what the problem is, and we will help you think through it.
Re: console application help
Thanx mate! I'm really appriciated!! I was thinking since yesterday, and now it is so easy so i think how could I not do it??!!
Thanks a lot!
Re: console application help
Quote:
Originally Posted by
BigEd781
We are glad to help students with their homework, we just prefer not to hand them an answer.
But you did just hand them the answer ;) As this is the first month of learning how to program, they really should be checking their notes for this kind of stuff. It's far too early to start getting handed the answers online, they might get lazy! ;)
Re: console application help
hehe I promise i won't ask for answers anymore and I will work hard :D