![]() |
While loop
Hi guys,
I am new here and my journey with programming has just started. I need help with while loop in C#. Could anyone help with coding this using while or for loop? it should count from 1 to 100 and prints out every number in the sequence that is divisible by 5 and tests whether that integer is even or odd. Thanks, Kasit |
Re: While loop
|
Re: While loop
Quote:
Do you mean evenly divisible by 5 since every number is technically divisible by 5 |
Re: While loop
Quote:
Thank you, |
Re: While loop
try this, and i'm not sure if this will work 100% since i havent compiled it
:
int i = 1;again, i might be wrong about some of that since i didnt compile it, and can't compile it because i dont have an IDE on my comp right now. |
Re: While loop
Mangle it a little bit and call it pseudocode. Then no one can bust your chops. ;)
|
Re: While loop
Good point, o well. I'll remember that next time.
|
Re: While loop
Quote:
:
using System;have done it like that but still isnt working, any hints? |
Re: While loop
Please wrap the code in [code] My code [/code ] tags !
Oh, and do tell what the problem is with the code. |
Re: While loop
I agree with xavier, we need to know what problem your getting so we can take a look.
|
| All times are GMT -5. The time now is 3:25 AM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC