C
C copied to clipboard
Update primeinrange.c for range issue
Changes made:
The num starts from 2, as 1 is not a prime number. Fixed the loop condition in the inner loop: i <= (num / 2) instead of i = (num / 2). Added a space after each prime number to improve readability. With these changes, the code should work as intended and print the prime numbers between 1 and 100.