Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8298167
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T15:40:12+00:00 2026-06-08T15:40:12+00:00

The assignment states Write a program to print only even numbers between 6 and

  • 0

The assignment states

“Write a program to print only even numbers between 6 and 16 using
events.”

while in the class we only use CL applications just having a button wouldnt work. So I thought about using an if than statement that would raise an event if CurrentNumber is even with mod 2 as current number is declared as 6

        While CurrentNumber < 17
        If CurrentNumber Mod 2 Then
            RaiseEvent Even()
            CurrentNumber = CurrentNumber + 1
        Else
            CurrentNumber = CurrentNumber + 1
        End If
    End While

But how would I handle the event to console.writeline(CurrentNumber) basically what I need to do is to make a program that prints even numbers using events how I was trying to solve the problems was to invoke in event if the number is even that shows the current number

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T15:40:14+00:00Added an answer on June 8, 2026 at 3:40 pm

    I think you are on the right track. What if you were to build a class that only had one purpose–to count numbers and raise events when an even or odd number occurs? Let’s say this class is called Counter.

    Next, what if your Program class had an instance of the Counter class and had an event handler only for the Even event? The handler could perform a Console.WriteLine() each time an even number occurs.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Assignment: Write a C++ program to read the menu information from menu.txt. First letter
I'm using python 3 for a small extra credit assignment to write an RSA
My assignment is to write an overloaded version of iquote() , a method that
The assignment at my first year uni computing course says my program should read
My assignment requires that I have an ER diagram that shows the dependencies between
For my Operating Systems class I have an assignment due that is built onto
I recently got an assignment to use the EXTEND OPEN command to add data
For a homework assignment the instructions state (within Undergrad class): You do NOT need
So first off, this is a homework assignment, so please don't write any code
I am stuck with solving my assignment. Here is what it states, Consider the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.