0
I need help..can anyone here help?
Can anyone help modify this code? I need it to have a range. Thus, the input shouldn't be less than 3 nd not more than 10000. If the input is less than 3 nd more than 10000, the program should print a sentence indicating no numbers can be printed because the input is less than 3 nd more than 10000 https://code.sololearn.com/cP7UXeOcExGT/?ref=app
2 Answers
+ 1
You can implement like this:
int n;
cout<<"Enter your number: ";
cin>>n;
if(n<3 || n>1000){
cout<<"Don't Run \n";
} else {
cout<<n<<"\n";
int store[n-1];
cout<<2<<" ";
//function call
isPrime(n, store);
}
0
Thanks bro