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
Input to be in the form of a string of less than 256 characters. Assume that this character string (record) can only be of the form: Last Name, First Name, Box number, City, St


What is .NET? It is a foundation fairly neutral structure. Is a coating between the son and the selection language? It can handle many selection dialects, such as VB.NET,

What is the switch Statement? This is a different form of the multi way decision that It is well structured, but can only be used in certain cases where: 1. Here, Only one var

What will be the output for the following instruction if CX=9087H and AX=9090H? 1) BTR AH,2? 10010000=10010000 2) BTC CX,9?1001000010000111=1001000110000111 3) NEG AX?

showing work Ubuntu system or either opensuse

Question 1 Explain the three traits of Object Oriented Programming Question 2 Write a note on (a) Assignment Operators                             b) Bitwise Operators.

The last exercise of each assignment will be continuous from assignment to assignment and will have the goal of building an e-store website by the end of the course. For the fir

need someone to write a simple cobol program for me..urgent

Introduction A new online system for purchasing carsis being designed and you have been contracted to write a C# console application program that models the proposed functio