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
Abstraction hierarchy of mechanisms Given  the light-sensitive the motor and resistor,  we could  find  several  ways  of interconnecting them, using bits of ceramic and metal

Expertsmind.com is expert in java assignment help JAVA Virtual Machine A Java exclusive device or java virtual machine (JVM) is an exclusive device able of undertaking Jav

Question: (i) What is multithreaded programming? Lists the benefits achieved by multithreading your code in a program. (ii) What type of coding should be eliminated when d

Hi, Can you do exercises: D2, D3, D4, and D5 on page 230 of the following book: http://www.daimi.au.dk/~bra8130/Wiley_book/wiley.html . The book can be downloaded for free from t

would you like to see some of my code. I am trying to do an add friend request. when I view my friends page I click on the add button. with ajax I want the script to send over the

We next require taking a look at arithmetic involving matrices. We'll begin with addition and subtraction of two matrices. Therefore, assume that we have two n x m matrices, which

Write a function named prob2.m which creates and returns an N×N identity matrix. An identity matrix is a square matrix with values of one on the main diagonal and zeros in all off-

The reader-writer problem can be stated as follows: A shared memory location can be concurrently read by any number of tasks, but when a task must write to the shared memory locati

Expertsmind brings you unique solution in java assignments String Handling Series signifies a sequence of character types. It has set duration of personality sequence. Onc

Windows XP using C# load a binary file and send it thru a USB port to the USB port of STM32. STM32 received the file and then write it into an I2C EEPROM.