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

  Write a paper about nosql as mechanism for storage of data

Write a 4 page technical paper about the NOSQL as a mechanism for storage and retrieval of data. It must have a technical background - don't write a business paper and business scenarios.

  Differentiate java bytecode and machine language code

What do we mean when we say that the English language is ambiguous? Give two examples of English ambiguity (other than the example used in this chapter).

  Why are the windows considered in three regions

Why are the windows considered in three regions when analyzing heat transfer through them? Name those regions and explain how the overall U-value of the window.

  Problem regarding the relational algebra

Write the following in relational algebra 1. List the ssn, fname, lname of employees who do not work in the Administration or Headquarters department (do not use a set operation).

  What are the advantages of thunderbolt

What are the advantages of Thunderbolt? When might one use SCSI to interconnect a peripheral? What is the difference between SCSI and iSCSI?

  What exactly did eckert and mauchley patent and why

What exactly did Eckert and Mauchley patent and why did the judge feel their system was based on Atanasoff's earlier work?

  Describe sharepoint services and various sharepoint options

discuss sharepoint services and various sharepoint options as well as windows media rights management to handle the

  Telecommunications planning model

Discuss how to utilize the telecommunications planning model in detail and also explain the significance of the strategic management in order to support this model.

  Questionto take advantage of a string means to change the

questionto take advantage of a string means to change the first letter of each word in the string to uppercase. for

  Export a list of properties for all services

Display a list of all services that are sorted by Status are displayed by groups in a Table - Export a list of properties for all services, sorted by Status

  Explore and visualize features of the game

Explore and visualize features. With access to players and teams attributes, team formations and in-game events you should be able to produce some interesting insights :)

  1read the lecture notes and select one 1 instance in the

1.read the lecture notes and select one 1 instance in the history of hci that you view as a key development that have

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