c# visual studio programming Watch

Ankushsingh852
Badges: 2
Rep:
?
#1
Report Thread starter 1 year ago
#1
i need someone who can divide the question to simple parts or steps so that i can understand the question

Write a Windows form Application that asks for two positive integers a and b. The program will then
display all prime numbers between that range. Your program should check for whether a<b, that they
are positive numbers, and that they are not strings. If an error occurs, specify the error to the user either
in a MessageBox or a Label.
Start by writing a method called all_primes that takes in two positive integers a and b (where a<b).
Then simply prints out all the prime numbers between a and b.
You should also create a function called prime that takes in one positive integer n and returns true or
false depending on whether it is a prime number



thanks Guys for your assistance
0
reply
winterscoming
Badges: 19
Rep:
?
#2
Report 1 year ago
#2
The problem sounds like it's already divided up into simple parts. try formatting it as a bullet-pointed list and tackle each one at a time:

  • Write a Windows form Application
  • that asks for two positive integers a and b.
  • The program will then display all prime numbers between that range.
  • Your program should check for whether a<b,
  • that they are positive numbers,
  • and that they are not strings.
  • If an error occurs, specify the error to the user either in a MessageBox or a Label.
  • Start by writing a method called all_primes that takes in two positive integers a and b (where a<b).
  • Then simply prints out all the prime numbers between a and b.
  • You should also create a function called prime that takes in one positive integer n and returns true or false depending on whether it is a prime number
0
reply
X

Quick Reply

Attached files
Write a reply...
Reply
new posts
Latest
My Feed

See more of what you like on
The Student Room

You can personalise what you see on TSR. Tell us a little about yourself to get started.

Personalise

University open days

  • Norwich University of the Arts
    Postgraduate (MA) Open Day Postgraduate
    Thu, 18 Jul '19
  • Bournemouth University
    Clearing Open Day Undergraduate
    Wed, 31 Jul '19
  • Staffordshire University
    Postgraduate open event - Stoke-on-Trent campus Postgraduate
    Wed, 7 Aug '19

Are you tempted to change your firm university choice now or on A-level results day?

Yes, I'll try and go to a uni higher up the league tables (131)
19.12%
Yes, there is a uni that I prefer and I'll fit in better (68)
9.93%
No I am happy with my course choice (390)
56.93%
I'm using Clearing when I have my exam results (96)
14.01%

Watched Threads

View All