Program Assignment / Visual Studio

User Generated

Snunq512

Computer Science

Description

i need help with my Program Assignment / Visual Studio

i need help with my Program Assignment / Visual Studio

Unformatted Attachment Preview

Part 1: In your program, write a method that accepts a positive integer and returns true if the number is a prime number and false otherwise. Note that 2 is the only even prime number. An odd integer is prime if it not divisible by any odd integer less than or equal to the square root of the number. Part2: A prime number whose reversal is also a prime number is called emirp. For example, 11, 13, 79 and 359 are emirps. Write a program that outputs to a ListBox the first 100 emirps. Your program must contain the method from Part 1 that returns true if a number is prime; false otherwise and another method that returns the reversal of a positive number. You can reverse the integer in the following way: • Convert the integer into a string value = num.ToString(); • Use the following code to reverse the integer string newNum = “”; for (int l = value.Length; l > 0; l--) newNum = newNum + value[l-1]; Also, your program should have a TextBox that will accept a positive integer from the user and then display whether the positive integer if an emirp. When you complete the program, do the following. 1. Create a folder with the following name: FinalProject Extra Credit: 10 Points In addition to using a ListBox for the output of the 100 emirps, also write these values to an output file. Add this as a method. You should use the values from the ListBox as output to the file.
Purchase answer to see full attachment
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

Explanation & Answer

Hello,...


Anonymous
Nice! Really impressed with the quality.

Studypool
4.7
Indeed
4.5
Sitejabber
4.4

Similar Content

Related Tags