Codings collected
Blog Archive
►
2009
(5)
►
April
(2)
►
March
(2)
►
February
(1)
▼
2008
(13)
►
September
(2)
►
August
(1)
►
July
(1)
▼
June
(3)
Oracle Codings
Print first 10 prime numbers
Lan Cable Colour Coding
►
April
(3)
►
March
(2)
►
January
(1)
About Me
Gurpreet Singh
View my complete profile
Thursday, June 19, 2008
Print first 10 prime numbers
To print first 10 Prime Number
Void main()
{
Int I, count=1;
For(i=1;i<=100;i++)
{
For(j=1;j<=I;j++)
{
If(j%2==0)
{
Continue;
}
If(j==i)
{
Cout<<”Number is prime”<
Count=count+1;
}
If (count==10)
{
Break;
}
}
No comments:
Post a Comment
Newer Post
Older Post
Home
No comments:
Post a Comment