Hi This is my Code it works perfectly in Code Blocks and on Coding Blocks IDE
but during submissions, not even one test case if passing. Please can someone point out the error.
Link to Question - https://online.codingblocks.com/player/12975/content/4804?s=2154
Link to My Code - https://ide.codingblocks.com/s/46585
Copy of Code:
/*
Question is :
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.
*/
#include
using namespace std;
int main()
{
int number1, number2;
cin>>number1>>number2;
int count =0;
int i=0;
while(count<number1+1)
{
int num = (3*i)+2;
i++;
if((num%number2)==0)
{
}
else
{
cout<<num<<endl;
count++;
}
}
return 0;
}