c program for print terms of series 3n+2 but stop as soon as multiple of 4 is encountered
#include"stdio.h"
#include"conio.h"
void main()
{
int i,no;
clrscr();
printf("Series of 3n+2 is=\n\n");
for(i=1;i<20;i++)
{
no=(3*i)+2;
if(no%4==0)
{
printf("\n\n Series stop !!Because %d is multiple of 4 !!",no);
break;
}
else
{
printf(" %d",no);
}
}
getch();