Prime Number In C Programming Tamil


// printing 1-300prime numbers
#include<stdio.h>
#include<conio.h>
void main()
{
	int i,n=0;
	clrscr();	//clears the output screen
	printf("\n Prime Numbers Between 1 and 300 :");
	while(n<=300)
	{
		i=2;
		while(i<n)
		{
			if(n%i==0)
				break;
			else
				i++;
		}
		if(n==i)
			printf(" %d\t",n);
		n++;
	}
	getch();	// keeps the output screen standard to view
}

Login To Download Source Code

Leave a Comment:

Login To Comment

List Of Programs


Goto Examples

Operators

Looping

Number Conversion

Pattern Design

Arrays

Matrix Examples

Sorting Examples

String Function

Change Case

String In C

Maths Functions

User Defined Functions

Recursive Functions

Pointer

Structure

File Concept

Calender Programming