How many primes are there that are less than 10,000

Assignment Help Operating System
Reference no: EM13943212

Write a program that prints out the first n primes, and n is input by the user. Example as follows:

How many do you want to see? 3000

1: 2
2: 3
....

25: 97
26: 101
....

2999: 27437
3000: 27449

Program should be written in three files:

primes.h
main.c
is_primes.c

Attached are parts of two files (primes.h, is_primes.c)

Explain how is_prime() works. Complete the program by writting main() in main.c. There are 168 primes that are less than 1000. Does the program confirm this? How many primes are there that are less than 10,000?

Attachment:- is-prime.zip

Reference no: EM13943212

Questions Cloud

A firm plans to split its stock : A firm plans to split its stock 2-for-1. Which of the following most likely will NOT occur?
Description of the device : The presentation should include a discussion of 3-5 device alternatives.  Included in the presentation should be a description of the device, including the manufacturer, the model, the seller, the cost, and a summary of the manufacturer specificat..
Market value of equity-book value of equity of a firm : The book value of equity of a firm is $100 million and the market value of equity is $200 million. The face value of debt of the firm is $50 million and the market value of debt is $60 million. What is the market value of assets of the firm?
Problem regarding the program life cycle : The process to develop software takes more than writing Visual Basic code. Software developers use the seven (7) steps of the Program Development Life Cycle. Select the two (2) steps that you believe are the most important in the cycle. Provide ex..
How many primes are there that are less than 10,000 : Write a program that prints out the first n primes, and n is input by the user.
Manufactures time series photographic equipment : Photo chronograph Corporation (PC) manufactures time series photographic equipment. It is currently at its target debt-equity ratio of .66. It’s considering building a new $65.6 million manufacturing facility. This new plant is expected to generate a..
Strategic implications of the blurring of boundaries : Identify the strategic implications of the blurring of boundaries between nonprofits and for-profits in the donor- advised funds field.
Differ only in their capital structure : Companies A and B differ only in their capital structure. A is financed 30% with riskless debt and 70% with equity; B is financed entirley with equity. Both companies operate in a perfect capital market and earn $200,000 of operating income each year..
An average convective heat transfer coefficient : The biot modulus for a 3 cm diameter sphere at 100degree C subjected to a convective air flow resulting in an average convective heat transfer coefficient from the surface of 30W/m2

Reviews

Write a Review

Operating System Questions & Answers

  Implementation of algorithms for process management

The Shortest Job Next (SJN) algorithm queues processes in a way that the ones that use the shortest CPU cycle will be selected for running rst.

  Develop a user mode command interpreter

Develop a user mode command interpreter which support list-short.

  Memory allocation in operating system

Analysis and implementation of algorithms for memory allocation in operating system, Explain First- t and best- t methods are used in memory allocation in operating systems.

  Stand alone child process

Forking the child process

  Write a multi-threaded program

Write a multi-threaded program to solve producer and consumer problem

  Marginal and average cost curves

n a competitive market place (pure competition) is it possible to continually sell your product at a price above the average cost of production.

  Simulating operating systems scheduling

Simulate the long-term scheduler, the short-term scheduler and the I/O scheduler of the computer using the First-Come-First-Serve algorithm.

  Issues with trusted platform module

Research paper discussing the issues with Trusted Platform Module (TPM)

  Threads

Explain a complication that concurrent processing adds to an operating system.

  Design and programming

Use the semaphore methods to control the concurrency of the solution

  Virtual machines

Virtual machines supported by a host operating system

  Discuss an application that benefits barrier synchronization

Discuss an application that would benefit from the use of barrier synchronization

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