//AN IMPLEMENTATION TO FIND ALL PRIME NOS. UPTO 10 COUNT
#include<stdio.h>
int main()
{
int rem=1,i,num=2;
while(num < 24)//to print the prime no. upto 23
{
for(i=2;rem!=0;i++)//check if no. is divisible by any other no. ..loop will continue untill remainder become 0....untill value of num become value of i & that i will be divisble by that number...means number is divisible by itself//
rem=num%i;
if((i-1)==num)//if num is divisible by itself ...i=i-1 bcz ,,,when condition become false ..i will ++ment once more..//
printf("num=%d\n",num);//then it will print prime no. to that number..//
++num;//++ment 1 more no.
rem=num%i;//take remainder again to check..if it is 0 or not..//