I've made an algorithm that in theory, should display every number between a range that can be manually inputted by a human. Its brain is programmed like so.
//Prime Number Displayer
#include <iostream>
using namespace std;
int main(){
int Low, High, check;
cout<<"Enter positive integer."<<endl;
cin>>Low;
cout<<"Enter a second positive integer."<<endl;
cin>>High;
cout<<"You will get a set of all prime numbers between "<<Low<<" and "<<High<<"."<<endl;
check=(Low%2);
while (Low <=High){
if(check==1){
cout<<""<<Low<<""<<endl;
check++;
}
}
return 0;
}
I want the program to display each prime number inside the range on an individual line. I can't seem to get any results other than the number on the low range being outputted and nothing else. Please and thank you.