0
I can't understand ..where to put open braces{ and closed braces in these given coding and why we put i=2 and at last i==num
#include<stdio.h> int main() { int num,i; printf("Enter the number\n"); scanf("%d",&num); i=2; while(i<=num-1) { if(num%i==0) { printf("this is not a PM"); break; } i++; } if(i==num) printf("prime number\n"); }
1 Odpowiedź
0
i find it easier to use indentation as well.
https://code.sololearn.com/ciNBO5hV4s8R/?ref=app