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

  Determine potential causes of the problem

A user calls to report that she is not able to log on to email. You respond with a couple of quick questions. Because you think that no one else is using the network right now,

  Differences in windows, mac os, unix, and linux os

Discuss the fundamental differences in Windows, Mac OS, UNIX, and Linux operating systems for personal computers? Determine the unique characteristics do mainframe operating systems have?

  Designing crow foot e-r diagram

Make an IE Crow's Foot E-R diagram for the entities section and employee and the 1:N relationship between them. Suppose that a section/department does not require to have an employee.

  How does a operating system works

how does a operating system works

  Explain the impact on the disks cache of several queries

Explain the impact on the disk's cache of several queries running concurrently, each scanning a different file. Can the above problem be addressed by the DBMS buffer manager doing its own prefetching? Explain.

  Role and responsibilities of a network administrator

Create a job description of the role and responsibilities of a network administrator. Provide a detailed list of personal traits and skills necessary for a person to be a highly effective network administrator.

  Question 1athe salaries of employees of a firm are found to

question 1athe salaries of employees of a firm are found to be follow a normal distribution of mean rs 13 500 and

  Performing the maintenance

A hard drive must be managed to be used most efficiently. This maintenance with deleting old files, defragmenting a drive so that it does not waste space, as well as, from time to time, discovering and attempting to correct disk failures.

  How long should a system be idle to benefit from hibernating

If reading or writing a cache-line of size 64 bytes to Flash requires 2.56 ?J and DRAM requires 0.5 nJ, and if idle power consumption for DRAM is 1.6 W (for 8 GB), how long should a system be idle to benefit from hibernating? Suppose a main memory..

  How are shared memory message passing rpc and sockets

How are shared memory, message passing, RPC, sockets, and pipes implemented practically in systems such as POSIX, Mach, and Windows?

  Questiona furniture manufacturer produces two types of

questiona furniture manufacturer produces two types of desks standard and executive. these desks are then sold at rs

  Characteristics of atm networks

Determine the characteristics of ATM networks, as well as their advantages and limitations. Discuss the ideas of connection oriented and connectionless protocols.

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