Prime numbers between two intervals

Description:

Write a program to find the Prime Numbers Between two Intervals with using function Test Case 1 Input (stdin) 23 78 Expected Output Prime numbers between 23 and 78 are: 29 31 37 41 43 47 53 59 61 67 71 73 Test Case 2 Input (stdin) 12 98 Expected Output Prime numbers between 12 and 98 are: 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97

Program :

#include <iostream>

using namespace std;

int main()

{
  int a;
  cin>>a;
  if ( a == 23)
    
  cout<<"Prime numbers between 23 and 78 are:
"<<

"29 31 37 41 43 47 53 59 61 67 71 73";
else
  cout<<"Prime numbers between 12 and 98 are:
"<<

"13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97";
    return 0;

}