+1(316)4441378

+44-141-628-6690

CS 165 02 Final Project

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.

Add the following comments to the beginning of the program.

Name:    Your Name

Class and Section:    CS 165 02

Assignment:    Final Project

Due Date:    See above

Date Turned in:

Program Description:    You write a short description of what the program will do

When you complete the program, do the following.

1. Turn in a printout of the source code with this sheet attached to the front

2. Create a folder with the following name: FinalProject

3. Copy your project to this folder

4. Copy the folder to the following location: I:\kopp\inbox\CS 165 02\your name where your name is a folder located in I:\kopp\inbox\CS 165 02.

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.

 

You can place an order similar to this with us. You are assured of an authentic custom paper delivered within the given deadline besides our 24/7 customer support all through.

 

Latest completed orders:

# topic title discipline academic level pages delivered
6
Writer's choice
Business
University
2
1 hour 32 min
7
Wise Approach to
Philosophy
College
2
2 hours 19 min
8
1980's and 1990
History
College
3
2 hours 20 min
9
pick the best topic
Finance
School
2
2 hours 27 min
10
finance for leisure
Finance
University
12
2 hours 36 min
[order_calculator]