+1(316)4441378

+44-141-628-6690

C programming using functions

TWIN PRIMES IN A RANGE OF NUMBERS
———————————–

Twin primes are two consequetive odd numbers that are prime.

Write a function that returns 1 if the input is a prime and
0 otherwise.

int is_prime(int number) {
}

Write a C Program to generate all twin primes in a given range
of numbers using the is_prime function.

Your program will input following from the command line:

min : start of range, an integer

max : end of range, an integer

These numbers define the range of numbers [min,max]
inclusively.

Here is a sample input line:

1 7

We will output every twin prime in the range
[1, 7].

Here is the output of the above input line:

3 5
5 7

Sample Runs:
———–

Input:
1 7

Output:
3 5
5 7

Input:
2 9

Output:
3 5
5 7

Input:
7 21

Output:
11 13
17 19

 

You can place an order similar to this with us. You are assured of an authentic custom paper delivered within the given deadline besides our 24/7 customer support all through.

 

Latest completed orders:

# topic title discipline academic level pages delivered
6
Writer's choice
Business
University
2
1 hour 32 min
7
Wise Approach to
Philosophy
College
2
2 hours 19 min
8
1980's and 1990
History
College
3
2 hours 20 min
9
pick the best topic
Finance
School
2
2 hours 27 min
10
finance for leisure
Finance
University
12
2 hours 36 min
[order_calculator]