avatar
Gaurav
0

Codes

2

Answers

Code compilers

Top answers

0
prime number c
February-11-2022
#include<stdio.h>
int main()
{
    int num,PrimeCount=0,i,flag,prime=1;
    printf("\n enter the number:");
    scanf("%d",&num);
    while(num!=PrimeCount)
    {
        flag=0;
        prime++;
        for(i=2;i<=(prime/2);i++)
        {
            if(prime%i==0)
                flag=1;
        }
        if(flag==0)
        {
            PrimeCount++;
        }
    }
    printf("%d prime number is: %d",num,prime);
    return 0;
}
0
php reverse program
February-05-2022
strrev($string)