C# Program to check number is prime or composite

C# Program to check number is prime or composite - is the information you are looking for, and in the blog Google News we have provided her, all right in this article titled C# Program to check number is prime or composite we will discuss it in full, in addition to the information we have also provided a lot of info about the latest gadgets and a wide range of tips and tricks that according to the gadget you are using, well please continue reading:

Penyanyi : C# Program to check number is prime or composite
Judul lagu : C# Program to check number is prime or composite
Article Csharp, Article programming, Article programs,

You can also see our article on:


C# Program to check number is prime or composite

C# Program to check entered number is prime or composite 

Program Statement:
Write a program that takes an integer as an input from user and prints if it is a prime or composite number.

Solution:
 static void Main(string[] args)
{
int num, i;
Console.WriteLine("Enter the number to check number is prime or composite");
num=Convert.ToInt32(Console.ReadLine());
i = 2;
while (i <= num - 1)
{
if (num % i == 0)
{
Console.WriteLine("composite number: "+num);
break;
}
i++;
}
if (i == num)
Console.WriteLine("prime number: " + num);
Console.ReadLine();

}




Demikianlah Artikel C# Program to check number is prime or composite

Sekian Kunci gitar C# Program to check number is prime or composite , mudah-mudahan bisa memberi manfaat untuk anda semua. baiklah, sekian postingan Chord gitar lagu kali ini.

Anda sedang membaca artikel C# Program to check number is prime or composite dan artikel ini url permalinknya adalah https://googledoodlenewstoday.blogspot.com/2013/12/c-program-to-check-number-is-prime-or.html Semoga artikel ini bisa bermanfaat.

Tag : , , ,
Share on Facebook
Share on Twitter
Share on Google+

Related : C# Program to check number is prime or composite

2 komentar:

  1. One incredible thing about this shampoo is that the effects last for longer than 24 hours. This product is ideal for people on a budget. Even better than all of that is how fast acting it is – it gets to work within 10 – 15 minutes. Support local journalism by subscribing to your Blank Slate Media community newspaper for just $35 a year. Rescue Detox Shampoo is the ideal solution to help you get through hair follicle tests without damaging your hair. Your hair will be as healthy, soft, and shiny as you remember it always being.

    BalasHapus
  2. After these comes the body itself. Many things, like the amount of exercise, body fat cells, metabolism, and a person’s eating habits can affect the duration of THC in their system. All things considered, there is no fail proof way to pass a drug test 100% of the time. Rather than depending on a single trick or product, the best strategy is to use a combination of them. So start drinking a lot of water as soon as possible before your drug test. You should also make an effort to be as physically involved as possible. Go to the gym a few times or find a way to get in a couple of extra workouts if you can. The goal here is to flush your system as much as possible as soon as possible. While you’re trying the products mentioned earlier or any of the remedies, it’s best to work out and hydrate as well to avoid withdrawal symptoms. On the contrary, it makes things worse. Combining alcohol with the THC in your body only works to increase those levels. It is never a good idea to use alcohol while you’re in the middle of detoxing from THC. Using an expired powder or liquid could result in a failed test. Generally, a chemical product like fake urine will last you around 2-3 years. There are a few factors that could diminish its shelf life, regardless of the brand chosen. • Left in extremely hot or cold environments • Exposed to excessive sun • Uncapping the product and exposing it to oxygen for a long period • Exposure to humidity or dust Store your kit in a safe, secure place. It's best to keep it at room temperature and out of the sun. These conditions may even extend the life of the product. There are a few ways you can check whether the bottle is still good to use: • Smell it and analyze whether the scent is similar to regular urine. If it smells really bad, the product is most likely tainted.

    BalasHapus