Program wont print prime numbers

The problem I'm having is that when you put in the two numbers the answer is just prime.... nothing. I cannot figure this out ive been working on this forever, can someone please god just tell me how to fix this without encrypted "hints".

#include <iostream>
#include <cmath>

using namespace std;

// FUNCTION PROTOTYPE FOR read_range
void read_range(int& imin, int& imax);

// FUNCTION PROTOTYPE FOR is_prime
bool is_prime(int& k);

// DO NOT MODIFY THE MAIN ROUTINE IN ANY WAY
int main()
{
  int imin(0), imax(0);
  

  // Read in range
read_range(imin, imax);

// Print prime numbers

 cout << "Primes:";
 for (int k = imin; k <= imax; k++)
   {
     if (is_prime(k)) 
       { 
     cout << "  " << k; 
       }
   }
 cout << endl;
 
 return 0;
}

// DEFINE FUNCTION read_range() HERE:
void read_range(int& imax, int& imin)
{
  cout<<"Enter minimum and maximum:";
  cin>>imin>>imax;
  while(imin>imax)
    {
     cout<<"Error, Minimum must be less then maximum"<<endl;
     cout<<"Enter minimum and maximum:";
     cin>> imin>>imax;
    }
  while((imin<2 || imax<2))
    {
      cout<<"Error, Minimum and maximum must be at least 2"<<endl;
      cout<<"Enter minimum and maximum:";
      cin>> imin>>imax;
    }
}


// DEFINE FUNCTION is_prime() HERE:
bool is_prime(int& k)
{
  
  for(int i=2; i<=(k-1); i++)
    {
      if (k%i !=0)
    true;
      
    }
    
  
}

Why do I get the feeling this is a homework assignment that is not posted to the homework forum?

Moderator comments were removed during original forum migration.

Hi c++newb,
your first 2 posts were in the Homework section and this "problem" too seems like a homework problem. So, it's a request to post the problem/question in the proper forum to get a response on proper lines.