Print series quest Take the following as input. A number (N1) A number (N2) Write a function which prints first N1 terms of the series 3n + 2 which are not multiples of N2

why is their no output showing when i submit my code, there is no error in run code output shows success but when i submit it shows no output
#include
int multy(int ,int)
{
int N1;
int N2;
int n;
if(N1>0&&N1<100){
if(N2>0&&N2<100){
for(n=0;n<=N1;n++)
{
int seq=3*n+2;
if(seq%N2!=0)
{

 std::cout<<seq;

}
}
}
}}
int main() {
int N1;
int N2;

std::cin>>N1;
std::cin>>N2;
multy(N1,N2);

return 0;
}

this is my code

@Anoushka_1805 hey anoushka the problem in your code is that you’re not passing the argument to the function you don’t need to create separate variable delete int N1,int N2;
pass it like int multy(int N1,int N2)
in the for loop start loop from n=1
and update the conditon like
if(seq%N1!=0)
std::cout<<seq<<std::endl;
else
N1++;

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.