{"id":4133,"date":"2021-09-09T23:00:00","date_gmt":"2021-09-09T17:30:00","guid":{"rendered":"https:\/\/www.codingbroz.com\/?p=4133"},"modified":"2021-11-23T19:45:30","modified_gmt":"2021-11-23T14:15:30","slug":"c-program-to-check-whether-a-number-is-prime-or-not","status":"publish","type":"post","link":"https:\/\/www.codingbroz.com\/c-program-to-check-whether-a-number-is-prime-or-not\/","title":{"rendered":"C Program To Check Whether a Number is Prime or Not"},"content":{"rendered":"\n

In this post, we will learn how to check whether<\/strong> a number is prime or not using C<\/strong> Programming language.<\/p>\n\n\n\n

\"C<\/figure>\n\n\n\n

A number is called a Prime number<\/strong>, if it is divisible only by itself and one. This means a Prime number has only two factors – 1 and the number itself. For example: 2, 3, 5, 7, 11, . . . etc.<\/p>\n\n\n\n

A number is called a Composite Number, if it has more than two factors. For example: 4, 15, 26, 98, . . . etc.<\/p>\n\n\n\n

Note:<\/strong> 1 is neither a prime number nor composite number.<\/p>\n\n\n\n

So, without further ado, let\u2019s begin the tutorial.<\/p>\n\n\n\n

\n