Hi I'm trying to display all the numbers that are more than 15 but are less than 50 in a nested for loop and I'm not quite sure how to go about it, (I picked up C# 2 weeks ago) HELP!

Here's my code

Recommended Answers

All 3 Replies

First of all decide what your question is. I cant understand, in the title you have something, and then something else. Properly describe, your question, and the answer you have come up with till now.

Two weeks is enough for you to grasp the basic. If you are here looking for someone to do your work, then try somewhere else.

Do some work. if you have errors, we'll help you correct them.

Sounds like another student homework assignment. We get lots of those up here.
Anyway, study the modulus operator, and you will discover the answer.

do u mean that accept division on 4 without remaining??

for(int i=15; i<50; i++)
{
if( i%4 == 0)
Console.WriteLine(i); //prints number 
}
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.