PRIME NUMBER BETWEEN 1 TO 100 IN CONSOLE APPLICATION
1 2 Write The Code For The Prime Numbers Between 1
To 100.
2 3 Code…..
//……………………………………………………………………..//
static void Main(string[] args)
{
bool IsPrime = true;
Console.WriteLine ("Prime numbers :");
for (int i = 2; i <= 100; i++)
{
for (int j = 2; j < 100; j++)
{
If (i !=j && i%j ==0)
{
IsPrime = false;
break;
}
}
if (IsPrime)
{
Console.Write("\t" + i);
}
IsPrime = true;
}
Console.ReadKey();
}
//……………………………………………………………………………………………………………………………………………………………………//
5- Output (Image-2)
6- Enjoy the Program
whatsapp goruntulu show
ReplyDeleteshow
ROPQ2W
whatsapp görüntülü show
ReplyDeleteücretli.show
7Z8
<a href="https://german-home.com/%d8%b4%d8%b1%d9%83%d8%a9-%d8%aa%d9%86%d8%b8%d9%8a%d9%81-%d8%a8%d8%a7%d9%84
ReplyDelete