Create program that outputs to listbox first hundred emirps

Assignment Help Programming Languages
Reference no: EM131765213

Assignment

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.

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.

Reference no: EM131765213

Questions Cloud

Pv of a perpetuity : If your required rate of return was 10% a year, how much would you pay today for $100 a month forever?
Prepare the service revenue budget : Prepare the service revenue (sales) budget for 2011 by listing the departments and show. ing for each quarter
Needs analysis and design and evaluation of training : What is the relationship between needs analysis and the design and evaluation of training?
What is morgan agi after considering rental loss : During the year, Morgan had a rental loss of $13,000. What is Morgan's AGI after considering the rental loss.
Create program that outputs to listbox first hundred emirps : Create 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.
Explore the ethical issues present in the healthcare system : Identify the key features of the Affordable Care Act in the United States as well as the key features of healthcare proposals or systems in one other country.
What would the breakeven gasoline price in coming years : Assume the same information as in requirement 1, except the average price of gas for the next three years is not known and you are likely to drive 9,750 miles.
What will be its dividend payout ratio : If the company follows the residual dividend policy, how much cash dividend can be distributed, and what will be its dividend payout ratio?
Operating leverage-business risk : What do the above results suggest with regard to the operating leverage vs. business risk?

Reviews

Write a Review

Programming Languages Questions & Answers

  Write a haskell program to calculates a balanced partition

Write a program in Haskell which calculates a balanced partition of N items where each item has a value between 0 and K such that the difference b/w the sum of the values of first partition,

  Create an application to run in the amazon ec2 service

In this project you will create an application to run in the Amazon EC2 service and you will also create a client that can run on local machine and access your application.

  Explain the process to develop a web page locally

Explain the process to develop a Web page locally

  Write functions

These 14 questions covers java class, Array, link list , generic class.

  Programming assignment

If the user wants to read the input from a file, then the output will also go into a different file . If the user wants to read the input interactively, then the output will go to the screen .

  Write a prolog program using swi proglog

Write a Prolog program using swi proglog

  Create a custom application using eclipse

Create a custom Application Using Eclipse Android Development

  Create a application using the mvc architecture

create a application using the MVC architecture. No scripting elements are allowed in JSP pages.

  Develops bespoke solutions for the rubber industry

Develops bespoke solutions for the rubber industry

  Design a program that models the worms behavior

Design a program that models the worm's behavior.

  Writing a class

Build a class for a type called Fraction

  Design a program that assigns seats on an airplane

Write a program that allows an instructor to keep a grade book and also design and implement a program that assigns seats on an airplane.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd