Bu örnekte kullanıcı tarafından girilen sayının asal sayı olup olmadığını fonksiyonları kullanarak bulacağız ve ekrana yazdıracağız.
Bu örneğe başlamadan önce C# Asal Sayı Bulma sayfasını inceleyebilirsiniz.
namespace _69.AsalKontroluMetot
{
class Program
{
static bool AsalMi(int sayi)
{
for (int i = 2; i < sayi; i++)
{
if (sayi % 2 == 0)
{
return false;
}
}
return true;
}
static void Main(string[] args)
{
if (AsalMi(13))
{
Console.WriteLine("Girilen sayi ASAL bir sayidir.");
}
else
{
Console.WriteLine("Girilen sayi ASAL bir sayi DEGİLDİR.");
}
Console.ReadLine();
}
}
}
Ana programda kullanıcıdan sayı aldıktan sonra bu sayının asal sayı olup olmadığını öğrenmek için sayıyı “AsalMi()” fonksiyonuna gönderiyoruz.
AsalMi() fonksiyonu, gönderilen sayı asal sayı ise “true” değilse de “false” değerini döndürüyor. Asal sayının nasıl bulunduğunu detaylı olarak incelemek için C# Asal Sayı Bulma sayfasını ziyaret edebilirsiniz.
En son olarak ana programda AsalMi() fonksiyonun döndürdüğü değeri kontrol ediyoruz. Değer “true” ise girilen sayı asal bir sayıdır.
Kodun ekran çıktısı şu şekildedir:

134 Yorum
Hi, Neat post. There is a problem with your website in internet explorer, would test this… IE still is the market leader and a big portion of people will miss your magnificent writing because of this problem.
Muchos Gracias for your article post.Really looking forward to read more. Cool.
This is one awesome post.Really looking forward to read more. Really Cool.
fenofibrate pill order generic fenofibrate 200mg fenofibrate 160mg cheap
usa cialis sales order sildenafil 100mg online cheap sildenafil sale
zaditor 1mg over the counter brand tofranil buy tofranil 75mg generic
cost mintop tamsulosin 0.4mg sale erection problems
acarbose ca order generic fulvicin 250mg pill griseofulvin 250mg
aspirin 75mg for sale order eukroma for sale order zovirax for sale
Definitely, what a great site and instructive posts, I definitely will bookmark your site.All the Best!
This is a really good tip particularly to those fresh to the blogosphere. Brief but very accurate informationÖ Thanks for sharing this one. A must read article!
order melatonin sale meloset generic danazol sale
order dipyridamole 100mg pills buy lopid medication cheap pravachol
I truly appreciate this article post.Really thank you! Want more.
order dydrogesterone online cheap sitagliptin 100mg pills buy jardiance 10mg sale
buy florinef 100mcg without prescription imodium 2mg tablet buy loperamide without prescription
buy etodolac 600mg without prescription buy cilostazol 100 mg online pletal cheap
buy prasugrel 10 mg prasugrel 10mg over the counter buy detrol cheap
buy pyridostigmine 60mg order rizatriptan generic maxalt 10mg oral
order ferrous without prescription purchase ferrous sulfate online sotalol pill
latanoprost without prescription xeloda where to buy order rivastigmine pills
vasotec online buy lactulose online buy duphalac generic
betahistine 16 mg canada order haloperidol sale buy probenecid no prescription
buy generic premarin 0.625mg buy generic premarin 600 mg viagra next day delivery
order omeprazole generic purchase prilosec online lopressor online order
cialis 5mg generic order viagra for sale sildenafil in usa
I truly appreciate this blog article.Really thank you! Keep writing.
buy telmisartan molnupiravir 200 mg pills buy molnupiravir 200mg pill
Enjoyed every bit of your blog.Much thanks again. Fantastic.
order cenforce generic buy naprosyn pills for sale chloroquine brand
provigil cost promethazine buy online order prednisone 20mg pills
Thanks for your personal marvelous posting! I really enjoyed reading it, you may be a great author.I will make certain to bookmark your blog and will come back very soon.I want to encourage that you continue your great writing, have a niceweekend!
Regards, Great information! canada pharmaceuticals online
omnicef 300 mg pills buy glycomet 1000mg without prescription prevacid 30mg ca
accutane 20mg for sale purchase absorica without prescription azithromycin 250mg usa
oral azipro buy prednisolone 5mg pill order gabapentin generic
purchase atorvastatin for sale atorvastatin over the counter buy generic amlodipine
Thank you ever so for you post.Really thank you! Want more.
poker online real money free slots online buy furosemide 100mg pills
poker online games real money spins ventolin inhalator us
slots free online no deposit casino ivermectin 3mg over counter
I am so grateful for your article post.Really thank you! Want more.
buy amantadine paypal order amantadine online cheap generic avlosulfon 100 mg
free online blackjack no download synthroid 75mcg uk synthroid 75mcg for sale
Hello my friend! I want to say that this article is awesome, nice written and include approximately all vital infos. I’d like to see more posts like this.
Greetings! I know this is somewhat off topic but I was wonderingif youu knew where I could get a captcha plugin for my comment form?I’m using the same blog platform as yours and I’m having difficulty finding one?Thanks a lot!
Article writing is also a fun, if you be familiar with after thatyou can write or else it is complicated to write.
clomiphene 100mg price buy imuran medication imuran 25mg over the counter
methylprednisolone uk order aristocort 10mg generic triamcinolone 10mg price
levitra for sale online cost lanoxin zanaflex ca
phenytoin 100 mg canada buy oxybutynin 2.5mg online cheap oxytrol without prescription
aceon 8mg us buy desloratadine online cheap allegra buy online
baclofen 10mg cost how to buy baclofen toradol 10mg pills
claritin buy online purchase priligy online cheap buy dapoxetine sale
buy generic ozobax toradol uk toradol 10mg drug
Привет всем! Я всегда мечтал испытать азарт онлайн-казино, и наконец решился. После небольшого поиска я нашел сайт caso-slots.com, где представлены все популярные казино и даже список тех, где можно получить бонус на первый депозит. Это точно то, что я искал!
purchase alendronate colchicine 0.5mg brand macrodantin sale
Dogecoin (DOGE) is ‘an open source peer-to-peer currency’. In other words, it’s a cryptocurrency enabled by blockchain technology. It’s also one of the world’s most prominent ‘altcoin’ currencies (an alternative to the more established cryptos like Bitcoin and ether). Dogecoin is primarily famous for (and valuable because of) its loyal following and hype on social media and for carving out a name for itself in pop culture. The spot market is where buyers and sellers come together to place bids for DOGE on the open market. It’s usually the cheapest way to buy Dogecoin because it lets traders set their own price. A crypto wallet — often called a “hot wallet” — is a location for holding crypto “on-chain” (i.e. linked to the blockchain versus off-chain cold storage.) Many users use wallet applications to help them manage their blockchain addresses, since each chain uses its own addresses.
https://www.red-bookmarks.win/who-hold-the-most-bitcoin
The best cryptocurrency to invest in right now, or any time, depends on your individual goals. By monitoring news and social media sentiment and doing some technical analysis, you may be able to spot trending coins in time to capitalize and make a profit. A prolonged downturn brought the price down to $1.537 on July 19th. By September 9th, the price had risen steadily to $11.776. After a drop to $6.495 on September 30th, an uptrend pushed the price to $13.168 on October 26th. However, bearish trends dragged the price down to $10.192 by October 31st. No spam — just heaps of sweet content and industry updates in the crypto space. Bitpanda is the best option for users who need an easy way to manage their crypto portfolios from a single point. Its all-inclusive mobile app gives crypto investors the tools to invest in cryptocurrencies and crypto indices anywhere at any time.
inderal online order oral ibuprofen order plavix 75mg generic
glimepiride 1mg oral order misoprostol 200mcg online cheap generic etoricoxib
Thanks a lot for the blog article. Much obliged.
buy nortriptyline pills for sale buy pamelor generic buy acetaminophen 500mg without prescription
Im grateful for the blog.Thanks Again.
purchase medex pills purchase medex pill order metoclopramide generic
orlistat sale buy cheap orlistat buy cheap generic diltiazem
order famotidine pill prograf online buy oral prograf 1mg
buy generic azelastine 10 ml buy generic avapro buy irbesartan without prescription
esomeprazole 20mg usa order remeron for sale purchase topiramate pill
brand imitrex 50mg buy levofloxacin 250mg generic buy avodart generic
Very informative article.Much thanks again. Really Great.
order allopurinol without prescription buy rosuvastatin 20mg pill crestor 10mg pills
buy ranitidine tablets mobic drug generic celecoxib
Very good blog article.Thanks Again. Great.
buspin generic buspirone cheap buy generic amiodarone 200mg
order tamsulosin 0.2mg pill zofran buy online buy simvastatin 10mg without prescription
motilium 10mg pill order generic domperidone 10mg sumycin 250mg pills
brand spironolactone buy aldactone 25mg pill propecia 1mg without prescription
Appreciate you sharing, great blog.Much thanks again. Really Cool.
I value the blog post. Cool.
Thank you ever so for you blog.Really thank you!
forcan drug buy fluconazole 100mg for sale buy cipro 500mg online
Major thankies for the article.Really thank you! Fantastic.
I appreciate you sharing this post.Thanks Again. Will read on…
cost aurogra 50mg estradiol 2mg for sale yasmin cost
Thanks again for the article.Really thank you! Will read on…
buy flagyl 400mg generic metronidazole brand buy generic keflex 125mg
Thanks a lot for the blog.Much thanks again.
lamictal order prazosin 2mg cheap buy mebendazole online
order generic cleocin 300mg brand cleocin 300mg buy fildena 50mg online
Really appreciate you sharing this article.Really looking forward to read more. Want more.
retin gel canada tretinoin sale avana online order
nolvadex online where can i buy tamoxifen buy budesonide medication
cefuroxime 250mg cheap buy generic methocarbamol over the counter methocarbamol medication
order tadacip buy tadalafil 20mg sale indomethacin 75mg tablet
A round of applause for your blog article.Thanks Again. Awesome.
Dear immortals, I need some wow gold inspiration to create.
desyrel over the counter sildenafil 100mg over the counter buy clindamycin gel
buy lamisil 250mg pills buy terbinafine 250mg pill casinos
buy aspirin 75mg online cheap gamble online win real money gambling website
Great blog.Really thank you! Fantastic.
Very well written story. It will be helpful to anyone who usess it, including yours truly :). Keep doing what you are doing – for sure i will check out more posts.
need help writing a paper no deposit casino casino slots gambling
research papers writing learning essay writing buy cefixime for sale
Awesome blog.Much thanks again. Keep writing.
order calcitriol 0.25 mg for sale order generic tricor cost fenofibrate 160mg
where to buy amoxicillin without a prescription buy cheap trimox buy clarithromycin 500mg pill
Really appreciate you sharing this blog article.Thanks Again. Awesome.
Great blog article.Much thanks again.
Muchos Gracias for your article.Much thanks again. Really Great.
teenage acne treatment for girls best topical acne medication prescription purchase trileptal
Hi! Would you mind if I share your blog with my myspace group?There’s a lot of people that I think would really appreciate yourcontent. Please let me know. Thank you
catapres ca buy tiotropium generic spiriva pills
I really liked your article post.Really thank you! Cool.
wow, awesome article.Really thank you! Fantastic.
order uroxatral 10mg names of prescription allergy pills painkillers that don’t upset stomach
Hello! This is my first visit to your blog! We are a group of volunteers and starting a new initiativein a community in the same niche. Your blog provided us valuable information to work on. Youhave done a outstanding job!
buy minocycline tablets hytrin 1mg tablet ropinirole 1mg cost
buy sleep medications online buy sleeping pills online usa online doctors that prescribe wegovy
order letrozole for sale buy albenza medication oral abilify
best medicines to stop smoking get prescribe smoking cessation list of strongest pain meds
chloroquine structure hydroxychloroquine ingredients
buy provera 5mg sale order biltricide 600 mg online hydrochlorothiazide oral
Hi there! This is my first visit to your blog! We are a collection of volunteersand starting a new initiative in a community in the same niche.Your blog provided us valuable information to work on. You have done a outstanding job!
where can i purchase valtrex shingles treatment with valacyclovir insulin shots vs pills
Major thankies for the article post.Much thanks again. Much obliged.
buy cyproheptadine without prescription buy luvox 50mg pills how to get nizoral without a prescription
Hey There. I found your blog using msn. This is a very well written article. I will be sure to bookmark it and return to read more of your useful info. Thanks for the post. I will certainly return.
itraconazole online order common blood pressure pills names healthy snacks for lowering blood pressure
This is one awesome blog. Keep writing.
Thanks so much for the post.Much thanks again. Awesome.
Thank you for your blog post.Thanks Again. Really Cool.
buy generic duloxetine 20mg buy modafinil 200mg buy provigil 200mg
erosions in the duodenal bulb antiarrhythmic drugs common uses antibiotic for gram negative uti
Hey, thanks for the article post.Really looking forward to read more. Will read on…