/*
============================================================================
Name : C-Programming
Author : Code2care
Version : 1.0
Copyright : Code2care.org
Description : 96 : Print prime number between 1 to 1000
============================================================================
*/
#include
#include
int main(void) {
int i = 1, j = 2;
for (i = 1; i <= 1000; i++) {
j = 2;
while (j <= i - 1) {
if (i % j == 0) {
break;
}
j++;
}
if (i == j) {
printf("\n%d is a Prime number.", i);
}
}
return 0;
}
2 is a Prime number. 3 is a Prime number. 5 is a Prime number. 7 is a Prime number. 11 is a Prime number. 13 is a Prime number. 17 is a Prime number. 19 is a Prime number. 23 is a Prime number. 29 is a Prime number. 31 is a Prime number. 37 is a Prime number. 41 is a Prime number. 43 is a Prime number. 47 is a Prime number. 53 is a Prime number. 59 is a Prime number. 61 is a Prime number. 67 is a Prime number. 71 is a Prime number. 73 is a Prime number. 79 is a Prime number. 83 is a Prime number. 89 is a Prime number. 97 is a Prime number. 101 is a Prime number. 103 is a Prime number. 107 is a Prime number. 109 is a Prime number. 113 is a Prime number. 127 is a Prime number. 131 is a Prime number. 137 is a Prime number. 139 is a Prime number. 149 is a Prime number. 151 is a Prime number. 157 is a Prime number. 163 is a Prime number. 167 is a Prime number. 173 is a Prime number. 179 is a Prime number. 181 is a Prime number. 191 is a Prime number. 193 is a Prime number. 197 is a Prime number. 199 is a Prime number. 211 is a Prime number. 223 is a Prime number. 227 is a Prime number. 229 is a Prime number. 233 is a Prime number. 239 is a Prime number. 241 is a Prime number. 251 is a Prime number. 257 is a Prime number. 263 is a Prime number. 269 is a Prime number. 271 is a Prime number. 277 is a Prime number. 281 is a Prime number. 283 is a Prime number. 293 is a Prime number. 307 is a Prime number. 311 is a Prime number. 313 is a Prime number. 317 is a Prime number. 331 is a Prime number. 337 is a Prime number. 347 is a Prime number. 349 is a Prime number. 353 is a Prime number. 359 is a Prime number. 367 is a Prime number. 373 is a Prime number. 379 is a Prime number. 383 is a Prime number. 389 is a Prime number. 397 is a Prime number. 401 is a Prime number. 409 is a Prime number. 419 is a Prime number. 421 is a Prime number. 431 is a Prime number. 433 is a Prime number. 439 is a Prime number. 443 is a Prime number. 449 is a Prime number. 457 is a Prime number. 461 is a Prime number. 463 is a Prime number. 467 is a Prime number. 479 is a Prime number. 487 is a Prime number. 491 is a Prime number. 499 is a Prime number. 503 is a Prime number. 509 is a Prime number. 521 is a Prime number. 523 is a Prime number. 541 is a Prime number. 547 is a Prime number. 557 is a Prime number. 563 is a Prime number. 569 is a Prime number. 571 is a Prime number. 577 is a Prime number. 587 is a Prime number. 593 is a Prime number. 599 is a Prime number. 601 is a Prime number. 607 is a Prime number. 613 is a Prime number. 617 is a Prime number. 619 is a Prime number. 631 is a Prime number. 641 is a Prime number. 643 is a Prime number. 647 is a Prime number. 653 is a Prime number. 659 is a Prime number. 661 is a Prime number. 673 is a Prime number. 677 is a Prime number. 683 is a Prime number. 691 is a Prime number. 701 is a Prime number. 709 is a Prime number. 719 is a Prime number. 727 is a Prime number. 733 is a Prime number. 739 is a Prime number. 743 is a Prime number. 751 is a Prime number. 757 is a Prime number. 761 is a Prime number. 769 is a Prime number. 773 is a Prime number. 787 is a Prime number. 797 is a Prime number. 809 is a Prime number. 811 is a Prime number. 821 is a Prime number. 823 is a Prime number. 827 is a Prime number. 829 is a Prime number. 839 is a Prime number. 853 is a Prime number. 857 is a Prime number. 859 is a Prime number. 863 is a Prime number. 877 is a Prime number. 881 is a Prime number. 883 is a Prime number. 887 is a Prime number. 907 is a Prime number. 911 is a Prime number. 919 is a Prime number. 929 is a Prime number. 937 is a Prime number. 941 is a Prime number. 947 is a Prime number. 953 is a Prime number. 967 is a Prime number. 971 is a Prime number. 977 is a Prime number. 983 is a Prime number. 991 is a Prime number. 997 is a Prime number.