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

Assignment Help:

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?


Related Discussions:- Fortran function for find and print out all prime number

What is .net technology?, What is .NET TECHNOLOGY? .NET technological ...

What is .NET TECHNOLOGY? .NET technological innovation was presented by Enthusiasm, to get the industry from the SUN's Coffee. Few in the past, Enthusiasm had only VC++ and VB

Programming (problem solving), develop a pseudocode algorithm to determine ...

develop a pseudocode algorithm to determine the total amount of extra cost changed to the organizers for expenses accurednduring the workshop. the code is to be written for an unde

Application in pascal language for free pascal compiler , Before I describ...

Before I describe what you are supposed to do, please remember that this programming assignment is NOT a group project. You are NOT allowed to do this with anyone else's help. This

Discuss about wap architecture, Question 1 How to call a WML Script from a...

Question 1 How to call a WML Script from a WML Page? Question 2 Write short notes on WML Script Operators and Expressions Question 3 Write short notes on WML Script Statements

What is the purpose of a hashtable, Question: (a) How do you implement...

Question: (a) How do you implement the following in ASP.NET: (i) Server-side Comments (ii) Server-side Include Directives. (b) What is the purpose of a HashTable? (

Improved application deployment, Improved Application Deployment Data sourc...

Improved Application Deployment Data source implementation is perhaps the key to any Asp.net program implementation, and, if the database implementation is easily done, there is an

Brent''s method, This is what I have so far def root_brent(f, a, b, errorl...

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

Use case diagram incremental development, Introduction This assignment ...

Introduction This assignment builds on your application, produced in Assignment 1, which holds a list of cabins, which can be either read in from a text file or just hard coded

Robot factory game, A deterministic finite automaton (DFA) is an abstract m...

A deterministic finite automaton (DFA) is an abstract machine that reads input from a serial (nonreversible) stream and changes between a finite number of  states according to the

Write Your Message!

Captcha
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