Mode Gelap

Recent in Fashion

Best Seller Books

Prime Generator-2

  • Problem Description

    Write a program to find prime numbers between two range excluding the starting and ending number of given range

    Input 1: Lower Range

    Input 2: Upper Range

    Output:
    List of prime numbers

    Refer sample input and output for formatting specification.
  • CODING ARENA
  • lower=int(input())
    upper=int(input())
    for num in range(lower,upper + 1):
       if num > 1:
           for i in range(2,num):
               if (num % i) == 0:
                   break
           else:
               print(num)
  • Test Case 1

    Input (stdin)
    17

    23

    Expected Output
    17

    19

    23
  • Test Case 2

    Input (stdin)
    11

    31

    Expected Output
    11

    13

    17

    19

    23

    29

    31

Subscribe Our Newsletter

avatar
"By speaking behind my back, it means that you respect my existence enough not to act in front of my face."

Related Posts

0 Comment

Post a Comment

Article Top Ads

Parallax Ads

Article Center Ads

Article Bottom Ads