Create a program that will input a positive integer

Assignment Help Computer Engineering
Reference no: EM131877443

Problem

Use pseudocode to design a suitable program to solve it. In your program, make use of subprograms or functions with parameters and arguments. Note: some of the Programming Challenges will require some reworking to be implemented in RAPTOR.

Create a program that will input a positive integer from the user. The program should check to make sure the entry is a positive integer and then check to see if the number is a prime number. A prime number is a number that is divisible only by itself and 1. The first five prime numbers are 2, 3, 5, 7, and 11; you can check this directly from the definition. If the number is prime, the program should display a message to this effect. If the number is not prime, the program should display the number and its factors. For example, if the user enters the number 3, the output should be: The number 3 is a prime number. However, if the user enters the number 6, the output should be: The number 6 is not a prime number. The factors of 6 are: 1, 2, 3, 6.

Reference no: EM131877443

Questions Cloud

How a tp monitor manages memory and processor resources : Explain how a TP monitor manages memory and processor resources more effectively than a typical operating sys m.
How do you approach the issue in given case : You are the event manager and the AV company you have hired is offering you a 10% kickback from your client's AV order. How do you approach the issue?
Find the required return of portfolio : Treasury bills provide a 4% rate of return and the S&P 500's return is 16%. Find the required return of your portfolio.
What is net income : A firm has sales of $15838749, total assets of $10008826, and total debt of $6651814. If the profit margin is 6%, what is net income?
Create a program that will input a positive integer : Create a program that will input a positive integer from the user. The program should check to make sure the entry is a positive integer and then check.
What are the next steps for the radiology department : In a hospital's radiology department, the radiology report turnaround times have been a concern to the department. Doctors have been complaining about the long.
Find the earnings per share : Find the earnings per share. Find the dividends per share. Find the book value per share. Find the market to book ratio. Find the price-earnings ratio.
Prepare a schedule computing the net cash flow : Prepare a schedule computing the net cash flow from operating activities that would be shown on a statement of cash flows: using the indirect method
Develop a menu-driven program that inputs a number x : Develop a menu-driven program that inputs a number X, and at the user's choice, finds and displays the area (A) of one of the square with side X (use A = X^2).

Reviews

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

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