बिजनेस मार्केटिंग का लो कॉस्ट फंडा , अपने मोबाइल से ऑटो sms भेजकर मार्केटिंग करे विजिट करे http://autotextsms.com/ बिजनेस मार्केटिंग का लो कॉस्ट फंडा http://autotextsms.com/

Search This Blog

Translate

c program to print first 10 natural number square but stop as soon as divisible 2,3,4 is encountered

c program to print first 10 natural number square but stop as soon as divisible 2,3,4 is encountered

#include"stdio.h"
#include"conio.h"
void main()
{
int i,no;
clrscr();
printf("Square of first 10 natural number is=\n\n");
for(i=1;i<=10;i++)
{
no=i*i;
if((no%2==0)&&(no%3==0)&&(no%4==0))
{
printf("\n\n Series stop !!Because %d is divisible of 2,3,4 !!",no);
break;
}
else
{
printf(" %d",no);
}
}
getch();
}





c program to print first 10 natural number square but stop as soon as divisible 2,3,4 is encountered

C Program example List