BM Balmiki Mandal 21 May 2023 12 views 0 comments C Programming

Print Prime Numbers Between 50 and 100 Using C programming language

Generating Prime Numbers Between 50 and 100 Using C Programming

Print Prime Numbers Between 50 and 100 Using C" means you are required to write a C program that identifies and prints all the prime numbers within the range of 50 to 100.

A prime number is a natural number greater than 1 that has no positive divisors other than 1 and itself. In this context, you need to find and display the prime numbers between 50 and 100 using the C programming language.

This program prints all the prime numbers between 50 and 100. A prime number is a natural number greater than 1 that has no positive divisors other than 1 and itself.

Example 01:

#include<stdio.h>
int main(){
    int i, j;
    printf("The prime numbers between 50 and 100 are:");
    for(i=50; i<=100; i++) { 
        int count = 0;
        for(j=2; j<i; j++) { 
            if(i%j==0)
                count++;
        }
        if(count == 0)
            printf("\n%d",i);
    }
    return 0;
}

The output of this program is:

The prime numbers between 50 and 100 are: 53 59 61 67 71 73 79 83 89 97

Top Resources

Prime Numbers: C Program Example and Explanation

Design a function to check the given number is prime or not if prime return 1 else 0

Write a C Program to Check if a Number is Prime or Not Using For Loop

Writing a C Program to Print Prime Numbers Between 50 and 100

write a program to print prime numbers in 10 array elements.

Write a C program to input 10 numbers through the keyword and find the number of prime counts it stores the into a separate array and display it.

Further Reading:

 For further information and examples, Please visit[ C-Programming From Scratch to Advanced 2023-2024]

 

Note: If you encounter any issues or specific errors when running this program, please let me know and I'll be happy to help debug them!

0 Comments

No comments yet, Be the first to comment.

Post a Comment

Please sign in to post a comment.

Related Posts

C Bitwise Operators Explained: 10 Practice Programs with Output

E.1: Bitwise vs. Logical Operators#include<stdio.h> int main(void){ int x=7,y=19; printf("%d %d ",x&y...

AG Anvesh G 29 Nov 2026
Bit wise operators Assignment

Bitwise Operators practical assignment: Take runtime input, bit-level manipulation, and different data units r...

AG Anvesh G 27 Sep 2026
Understanding Float and Double Binary Representation in C

Understanding Float and Double Binary Representation in CIntroduction:When we store decimal numbers such as 10...

AG Anvesh G 31 May 2026