prime number identifier code in lex code
#1

prime number identifier code in lex code
Reply
#2
Prime number program in c: c program for prime number, this code prints prime numbers using c programming language. To check whether a number is prime or not see another code below. Prime number logic: a number is prime if it is divisible only by one and itself. Remember two is the only even and also the smallest prime number. First few prime numbers are 2, 3, 5, 7, 11, 13, 17....etc. Prime numbers have many applications in computer science and mathematics. A number greater than one can be factorized into prime numbers, For example 540 = 22*33*51

#include<stdio.h>

int main()
{
int n, i = 3, count, c;

printf("Enter the number of prime numbers required\n");
scanf("%d",&n);

if ( n >= 1 )
{
printf("First %d prime numbers are :\n",n);
printf("2\n");
}

for ( count = 2 ; count <= n ; )
{
for ( c = 2 ; c <= i - 1 ; c++ )
{
if ( i%c == 0 )
break;
}
if ( c == i )
{
printf("%d\n",i);
count++;
}
i++;
}

return 0;
}
Reply

Important Note..!

If you are not satisfied with above reply ,..Please

ASK HERE

So that we will collect data for you and will made reply to the request....OR try below "QUICK REPLY" box to add a reply to this page
Tagged Pages: lex program for prime number,
Popular Searches: lex code to check whether given string is valid identifier or not, count char words in lex, c code for identifier, need of prime no, lex code for counting vowelsnand consonant, the resource allocation syndrome the prime challenge of multi project management, wwrite a lex program number is prime or not,

[-]
Quick Reply
Message
Type your reply to this message here.

Image Verification
Please enter the text contained within the image into the text box below it. This process is used to prevent automated spam bots.
Image Verification
(case insensitive)

Possibly Related Threads...
Thread Author Replies Views Last Post
Shocked whatsapp today kerala lottery guessing number 3 25,990 04-12-2017, 09:03 AM
Last Post: jaseela123d
  lottery sambad 1st prize last number winning tips 5 1,516 21-08-2016, 08:46 AM
Last Post: sksariful 703@Gmail. com
  kerala lottery last guessing 3 number tips 4 1,873 06-08-2016, 08:59 PM
Last Post: sudhakarpraveen
  nagaland state lottery number guess tomorrow 2 1,629 28-07-2016, 03:31 PM
Last Post: jaseela123d
Thumbs Up how to calculate the last three winning number in kerala lottery 2 675 22-07-2016, 04:03 PM
Last Post: jaseela123d
  hack 3digit number for kerala lottery results 2 1,018 22-07-2016, 03:59 PM
Last Post: visalakshik
  how to calculate the last three winning number in kerala lottery 2 649 22-07-2016, 03:40 PM
Last Post: jaseela123d
Video disha vakani mobile number contact number 1 835 22-07-2016, 03:37 PM
Last Post: visalakshik
  how to calculate the last three winning number in kerala lottery 1 538 21-07-2016, 02:19 PM
Last Post: dhanabhagya
  lottery lucky number calculator 2 826 21-07-2016, 12:11 PM
Last Post: visalakshik

Forum Jump: