I am terrible with coding, so hopefully one can help.

I am in a basic coding computer science class, so I can only use codes involving do while loops, while loops, and if statements.

The user inputs two bounds and you need to calculate all the prime numbers between these two bounds.
I am having trouble calculating the prime numbers in the bounds.
Currently this is the code i have:
Code:
#include <stdio.h>
void getinput(int*,int*);
int numbers(int*, int*);
int main()
{
  int value1;
  int value2;
  getinput(&value1, &value2);
  numbers(&value1, &value2);
  return(0);
}

void getinput(int* value1,int* value2)
{
  do
  {
  printf("Enter starting range value:  ");
  scanf("%d",value1);
  if (*value1 < 0)
  {
  printf("\nError! Non-negative integers only!\n");
  }
  }
  while(*value1 <  0);
  do
  {
    printf("Enter ending range value: ");
    scanf("%d",value2);
  if (*value2 < *value1)
    {
      printf("\nError! Enter a value >= %d. \n",*value1);
    }
}while(*value2 < *value1);
return;
}



int numbers(int value1, int value2)
{
  int value;
  int counter;
 while (value1<value2);
    value1++;
    counter++;
  {
  if (value1%counter == 0)

  }
  while (value1%counter != 0);
    fprintf("\n %d", value)
  return;
}