Fortran function for find and print out all prime number, Programming Languages

Write a Fortran LOGICAL FUNCTION, called "is_prime", which determines if a given integer value is a prime number or not (A prime number is a natural number which has only two distinct natural number divisors: 1 and itself, such as 23,31). Note that 1 is not a prime number.

Write a main program that reads an integer number, n, from keyboard and writes (using format descriptor "I") all prime numbers between 1 and n to the screen as well as to an output file named "primes.dat", using is_prime function. This program must also determine the total number of prime numbers between 1 and n. Test/run your program and answer the following questions:

a- Find and print out all prime numbers between 1 and 200 (include print out in your report).

b- How many prime numbers exist between 100 and 10000?

Posted Date: 2/23/2013 6:08:31 AM | Location : United States







Related Discussions:- Fortran function for find and print out all prime number, Assignment Help, Ask Question on Fortran function for find and print out all prime number, Get Answer, Expert's Help, Fortran function for find and print out all prime number Discussions

Write discussion on Fortran function for find and print out all prime number
Your posts are moderated
Related Questions
Your task for this project is to develop a system that would provide the following features: 1. Register new student 2. Drop student from university 3. Add a course and gr

Language-Integrated Query Language integrated query (LINQ, obvious "link") is a Enthusiasm .NET Structure element that contributes ancient data querying abilities to .NET dialects,

Problem 1 Explain the Booch Methodology 2 Why does every interaction diagram need a written description? Explain 3 Explain the five core workflows of the Unified Process

This is what I have so far def root_brent(f, a, b, errorlimit = tinyerror, n = -1, r_i = 0): # f(a) and f(b) must have opposite signs poly = remove_multiple_roots(poly) counter

fow to I write a emplate that reads a set of numbers typed at the keyboard into an array of T

Implement the pull-down menu package

Suppose you have a ?le orase of city and country names, like this: Cluj, Romania Debrecen, Hungary Klagenfurt, Austria Berlin, Germany Szeged, Hungary Budapest, Hungary Lintz, A

Educational Objectives: After completing this assignment, the student should be able to accomplish the following: Apply generic algorithms in solving programming problems Define an

For this assignment you will need to design and construct a basic math program which targets elementary school children. Your program must adhere to the following steps and require

You are asked to develop a replicator (client) that distributes a large job over a number of computers (a server group) on a single switched LAN (our BU04 lab). In this assignment,