Answer to Question #28977 in C# for sharmila rani

Question #28977
Program to generate even No. 22 to 40
1
Expert's answer
2013-05-02T10:27:34-0400
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace generate_even_No
{
class Program
{
//main function
static void Main(string[] args)
{
for (int i = 22; i <= 40; i++) {
if (i % 2 == 0) {//generate even No. 22 to 40
Console.WriteLine(i.ToString());//show numbers
}
}
Console.ReadLine();//delay
}

}
}




Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS