Program to display the number of prime numbers in the range entered by user and to display their sum.

This program will take a number as input from user and will display the number of prime numbers in the range starting from 0 to the number entered by user.

Also, it will be the sum of the prime numbers in that range.

We will be displaying program which is compatible with Dev C++.

You can download dev c++ from here

 

Program Code:

 

 

 

Output:

Prime numbers in the range and their sum

Leave a Reply

Your email address will not be published. Required fields are marked *