i had to make a program to print first 25 semiprimes i.e numbers which can be expressed as product of two primes (distinct or indistinct).
My code seems fine but the output is not right whats the snag ??
for checking if a number is prime we need to only check if it is divisible by a number upto x/2 more precisely upto sqrt x would do .
this is done to increase the efficiency of the program
oops that s hould have been i<=x/2 but still it doesnt print 4