Bu örnekte do-while döngüsünü kullanarak sayı tahmin oyunu yapacağız.
package kodbloklari.com;
import java.util.Random;
import java.util.Scanner;
public class SayiTahminOyunu {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
Random rastgele = new Random();
int rastgele_sayi = 1 + rastgele.nextInt(49);
//System.out.println("Rastgele atanan sayi = " +rastgele_sayi);
System.out.println("Rastgele sayi 1 ile 50 arasındadır.");
int sayi,sayac = 0;
do {
System.out.print("Bir sayi giriniz: ");
sayi = scan.nextInt();
if(sayi > rastgele_sayi) {
System.out.println("Sayiyi küçültün.");
}
else if(sayi < rastgele_sayi) {
System.out.println("Sayiyi büyütün.");
}
sayac++;
}
while(sayi != rastgele_sayi);
System.out.println("Tebrikler!! " + sayac + ". denemede sayıyı buldunuz.");
}
}
Önce 0-50 arasında rastgele bir sayı üretiyoruz. Bu sayıyı görmek için 13.satırdaki açıklama satırını kaldırabilirsiniz.
Rastgele sayı üretiminin detaylı anlatımı için Java Rastgele Sayı Üretme sayfasını ziyaret edebilirsiniz.
Daha sonra kullanıcıdan “sayi” değişkeniyle tahmin alıyoruz ve kullanıcının tahminiyle atanan sayı yani “rastgele_sayi” değişkeni aynı oluncaya kadar döngü dönmeye devam ediyor.
“sayac” değişkeniyle de kullanıcının kaç tane deneme yaptığını buluyoruz.
Kodun ekran çıktısı da şu şekildedir:
241 Yorum
http://amoxildelivery.pro/# amoxicillin 750 mg price
order gasex online – gasex brand diabecon pills
http://clomiddelivery.pro/# can i purchase clomid
paxlovid for sale: buy paxlovid online – buy paxlovid online
http://doxycyclinedelivery.pro/# buy vibramycin
get clomid without rx: order cheap clomid – generic clomid pills
http://amoxildelivery.pro/# amoxicillin 750 mg price
п»їcipro generic: cipro 500mg best prices – cipro 500mg best prices
http://paxloviddelivery.pro/# paxlovid india
how much is amoxicillin: amoxicillin without rx – amoxicillin 250 mg price in india
doxycycline 25mg tablets: doxycycline over the counter – buy doxycycline without rx
order speman online cheap – buy speman generic order fincar pills
buy noroxin – cheap noroxin for sale buy confido generic
п»їpaxlovid: buy paxlovid online – paxlovid india
https://mexicandeliverypharma.online/# mexico drug stores pharmacies
п»їbest mexican online pharmacies: mexican rx online – mexican rx online
mexico drug stores pharmacies: mexican pharmaceuticals online – mexican drugstore online
buying prescription drugs in mexico online buying from online mexican pharmacy mexico pharmacies prescription drugs
mexico pharmacies prescription drugs: mexican online pharmacies prescription drugs – mexican online pharmacies prescription drugs
medicine in mexico pharmacies: medication from mexico pharmacy – buying from online mexican pharmacy
https://mexicandeliverypharma.online/# buying prescription drugs in mexico online
mexican online pharmacies prescription drugs mexico pharmacy mexican mail order pharmacies
buy finasteride without prescription – order kamagra 200mg generic buy alfuzosin online
mexican pharmaceuticals online: mexican online pharmacies prescription drugs – mexican online pharmacies prescription drugs
medicine in mexico pharmacies: mexico drug stores pharmacies – best online pharmacies in mexico
mexican border pharmacies shipping to usa mexican drugstore online mexican drugstore online
https://mexicandeliverypharma.online/# medicine in mexico pharmacies
mexican pharmaceuticals online: medication from mexico pharmacy – mexico drug stores pharmacies
mexican rx online: purple pharmacy mexico price list – mexican border pharmacies shipping to usa
purple pharmacy mexico price list mexico drug stores pharmacies mexico pharmacies prescription drugs
https://mexicandeliverypharma.online/# mexican border pharmacies shipping to usa
buying prescription drugs in mexico online: best online pharmacies in mexico – best online pharmacies in mexico
buying from online mexican pharmacy: buying prescription drugs in mexico online – п»їbest mexican online pharmacies
mexican rx online mexican pharmacy medicine in mexico pharmacies
medication from mexico pharmacy: mexican online pharmacies prescription drugs – mexican drugstore online
medication from mexico pharmacy: reputable mexican pharmacies online – mexican online pharmacies prescription drugs
buying from online mexican pharmacy mexican border pharmacies shipping to usa buying prescription drugs in mexico online
best online pharmacies in mexico: mexican drugstore online – purple pharmacy mexico price list
buying prescription drugs in mexico online: best online pharmacies in mexico – mexico drug stores pharmacies
medicine in mexico pharmacies: purple pharmacy mexico price list – mexico drug stores pharmacies
mexican pharmacy medicine in mexico pharmacies mexican drugstore online
mexico drug stores pharmacies: reputable mexican pharmacies online – medication from mexico pharmacy
mexico drug stores pharmacies: mexican drugstore online – mexican pharmaceuticals online
medicine in mexico pharmacies: mexican drugstore online – best online pharmacies in mexico
mexican mail order pharmacies: mexico pharmacies prescription drugs – mexican drugstore online
buying from online mexican pharmacy: reputable mexican pharmacies online – medicine in mexico pharmacies
medicine in mexico pharmacies: medicine in mexico pharmacies – mexican border pharmacies shipping to usa
mexico drug stores pharmacies: medication from mexico pharmacy – medicine in mexico pharmacies
reputable mexican pharmacies online: buying from online mexican pharmacy – mexican border pharmacies shipping to usa
purple pharmacy mexico price list: purple pharmacy mexico price list – mexican mail order pharmacies
п»їbest mexican online pharmacies buying prescription drugs in mexico mexico pharmacies prescription drugs
mexico pharmacies prescription drugs: п»їbest mexican online pharmacies – mexican mail order pharmacies
mexican border pharmacies shipping to usa: medicine in mexico pharmacies – mexican online pharmacies prescription drugs
mexico pharmacies prescription drugs: buying from online mexican pharmacy – best online pharmacies in mexico
mexican rx online medication from mexico pharmacy mexico drug stores pharmacies
mexican rx online: purple pharmacy mexico price list – purple pharmacy mexico price list
mexican online pharmacies prescription drugs: best online pharmacies in mexico – medicine in mexico pharmacies
mexican border pharmacies shipping to usa: mexican drugstore online – mexican drugstore online
purple pharmacy mexico price list purple pharmacy mexico price list mexican rx online
pharmacies in mexico that ship to usa: reputable mexican pharmacies online – mexican rx online
mexican drugstore online: п»їbest mexican online pharmacies – pharmacies in mexico that ship to usa
buying prescription drugs in mexico: mexico drug stores pharmacies – mexico drug stores pharmacies
mexican pharmacy pharmacies in mexico that ship to usa mexico pharmacies prescription drugs
mexican drugstore online: buying prescription drugs in mexico – medication from mexico pharmacy
mexican rx online: п»їbest mexican online pharmacies – mexico drug stores pharmacies
medication from mexico pharmacy: mexican rx online – mexican mail order pharmacies
mexican rx online mexican rx online mexico pharmacy
mexican drugstore online: mexico pharmacies prescription drugs – mexican pharmaceuticals online
mexican mail order pharmacies: п»їbest mexican online pharmacies – mexico drug stores pharmacies
mexico drug stores pharmacies: п»їbest mexican online pharmacies – mexican pharmaceuticals online
best online pharmacies in mexico mexico pharmacies prescription drugs п»їbest mexican online pharmacies
buying from online mexican pharmacy: mexico pharmacies prescription drugs – purple pharmacy mexico price list
buying prescription drugs in mexico online: medication from mexico pharmacy – п»їbest mexican online pharmacies
mexican pharmaceuticals online: buying prescription drugs in mexico online – mexican pharmaceuticals online
mexico drug stores pharmacies buying prescription drugs in mexico medication from mexico pharmacy
п»їbest mexican online pharmacies: mexican rx online – buying from online mexican pharmacy
mexico drug stores pharmacies mexican drugstore online reputable mexican pharmacies online
mexico drug stores pharmacies: mexico pharmacies prescription drugs – mexican border pharmacies shipping to usa
terazosin pills – buy generic dapoxetine online oral priligy
mexican mail order pharmacies: mexican rx online – pharmacies in mexico that ship to usa
mexican online pharmacies prescription drugs: mexico drug stores pharmacies – mexican drugstore online
mexican drugstore online: buying prescription drugs in mexico online – medicine in mexico pharmacies
This Writing is a treasure trove of knowledge. Thank you for The contributions!
pharmacies in mexico that ship to usa: mexico drug stores pharmacies – mexico drug stores pharmacies
tamoxifen bone density tamoxifen menopause clomid nolvadex
cytotec buy online usa: purchase cytotec – buy cytotec in usa
https://propeciabestprice.pro/# order cheap propecia without dr prescription
http://cytotecbestprice.pro/# Misoprostol 200 mg buy online
The commitment to high quality content really shows. I’m always excited to read The work.
get cheap propecia without dr prescription propecia generic cost propecia without prescription
buy cheap propecia pill: get propecia price – order generic propecia without rx
https://cytotecbestprice.pro/# cytotec abortion pill
http://cytotecbestprice.pro/# buy cytotec over the counter
buy propecia price buying generic propecia pills cost generic propecia without prescription
cheap propecia without insurance: propecia for sale – cost propecia
https://prednisonebestprice.pro/# prednisone 15 mg tablet
https://propeciabestprice.pro/# buy generic propecia
buy cytotec online buy cytotec pills buy cytotec over the counter
buy generic propecia without insurance: cost of propecia pill – get generic propecia prices
zithromax 500: zithromax azithromycin – zithromax 500 tablet
steroids prednisone for sale: can you buy prednisone – prednisone 10mg buy online
http://prednisonebestprice.pro/# prednisone online sale
brand prednisone: price for 15 prednisone – prednisone rx coupon
The writing style had me at hello. Engaged from start to finish, just like a perfect first date.
prednisone 10 mg price: prednisone 10 mg brand name – prednisone 50 mg price
http://propeciabestprice.pro/# buying propecia tablets
cost propecia without rx: cost of cheap propecia without rx – propecia buy
prednisone 21 pack: prednisone in india – prednisone 2.5 mg
https://prednisonebestprice.pro/# can you buy prednisone over the counter
farmacie online autorizzate elenco: super kamagra – acquisto farmaci con ricetta
https://viagragenerico.site/# viagra acquisto in contrassegno in italia
farmacie online autorizzate elenco: Farmacie on line spedizione gratuita – top farmacia online
farmacia online: super kamagra – comprare farmaci online con ricetta
I learned a lot, and now I’m curious about what else you could teach me. The intelligence is as captivating as The prose.
farmacia online piГ№ conveniente: avanafil in farmacia – migliori farmacie online 2024
farmacia online: avanafil generico – comprare farmaci online con ricetta
http://avanafil.pro/# acquisto farmaci con ricetta
acquisto farmaci con ricetta: farmacia online migliore – Farmacie online sicure
comprare farmaci online con ricetta: kamagra gold – farmaci senza ricetta elenco
farmacie online affidabili: Avanafil prezzo – farmaci senza ricetta elenco
I always learn something new from The posts. Thank you for the education!
http://farmait.store/# farmacie online affidabili
buy oxcarbazepine pill – pirfenidone cheap levoxyl cheap
farmacie online sicure: Cialis generico 5 mg prezzo – Farmacie online sicure
viagra online consegna rapida: viagra online – viagra generico in farmacia costo
http://sildenafil.llc/# buy viagra generic
cialis vs viagra canadian pharmacy: Buy Cialis online – cialis price at walmart
what happens when you mix cialis with grapefruit?: cheapest tadalafil – cialis generic online uk
https://sildenafil.llc/# over the counter alternative to viagra
buy viagra: Viagra online price – viagra without a doctor prescription
order lactulose without prescription – buy generic mentat generic betahistine
cialis quebec dollars canadien: Buy Cialis online – canadian pharmacy cialis
http://tadalafil.auction/# cialis for sale over the counter
https://indiapharmacy.shop/# pharmacy website india
discount ed meds
I loved The fresh take on this topic. The points resonated with me deeply.
http://indiapharmacy.shop/# buy medicines online in india
п»їbest mexican online pharmacies: Best pharmacy in Mexico – mexico drug stores pharmacies
http://mexicopharmacy.win/# buying prescription drugs in mexico
buy ed meds online
This post is a testament to The expertise and hard work. Thank you!
buy erectile dysfunction pills online: Cheapest online ED treatment – where can i buy ed pills
https://mexicopharmacy.win/# medicine in mexico pharmacies
online ed medications
http://edpillpharmacy.store/# buy erectile dysfunction pills
https://indiapharmacy.shop/# п»їlegitimate online pharmacies india
cheapest online ed treatment
cheap ed pills: Best ED pills non prescription – discount ed meds
https://indiapharmacy.shop/# online shopping pharmacy india
п»їbest mexican online pharmacies: Best pharmacy in Mexico – п»їbest mexican online pharmacies
best india pharmacy: Indian pharmacy online – reputable indian pharmacies
http://edpillpharmacy.store/# order ed pills online
where to get ed pills: cheap ed pills online – buying erectile dysfunction pills online
https://indiapharmacy.shop/# indian pharmacy paypal
cheapest ed pills: online ed medication – discount ed meds
mexico pharmacies prescription drugs: mexican pharmacy – medication from mexico pharmacy
https://edpillpharmacy.store/# erectile dysfunction pills online
cheapest online pharmacy india: indian pharmacy – reputable indian pharmacies
https://indiapharmacy.shop/# buy prescription drugs from india
mexico drug stores pharmacies: mexico pharmacy win – purple pharmacy mexico price list
purchase imusporin online – how to get colchicine without a prescription colcrys ca
https://mexicopharmacy.win/# buying prescription drugs in mexico online
buying prescription drugs in mexico: Best online Mexican pharmacy – mexican drugstore online
п»їlegitimate online pharmacies india: Cheapest online pharmacy – online shopping pharmacy india
http://mexicopharmacy.win/# mexican mail order pharmacies
medication from mexico pharmacy: Best pharmacy in Mexico – mexico drug stores pharmacies
online ed medication: best online ed medication – ed meds online
cheap ed meds: Cheapest online ED treatment – online ed medicine
medication from mexico pharmacy: Purple pharmacy online ordering – mexican mail order pharmacies
ed online treatment: Cheapest online ED treatment – ed rx online
trova il farmaci senza la necessità di una ricetta
in Italia Sun San Carlos de Bariloche vrij verkrijgbaar medicijnen in Zwitserland
домострой в архангельске барнаул день города погода остин саранск каталог официальный сайт
моя реклама брянск сварщик владивосток военное шоссе 5б анна кравченко
барнаул
can you buy lipitor over the counter Atorvastatin 20 mg buy online purchase lipitor
order deflazacort pill – buy generic brimonidine where can i buy alphagan
https://lisinopril.guru/# lisinopril tabs 20mg
buy cytotec pills https://tamoxifen.bid/# tamoxifen generic
lasix medication
tamoxifen joint pain: nolvadex estrogen blocker – nolvadex online
lipitor generic price canada buy lipitor 20mg lipitor 5mg
lipitor 20 mg tablet: lipitor prescription prices – lipitor 20mg canada price
cytotec pills buy online http://furosemide.win/# furosemide 40mg
lasix 100mg
http://cytotec.pro/# buy cytotec over the counter
order cytotec online buy misoprostol over the counter cytotec abortion pill
cytotec pills buy online http://furosemide.win/# lasix generic
lasix 20 mg
how to get gabapentin without a prescription – buy cheap generic nurofen order azulfidine 500 mg
https://furosemide.win/# lasix dosage
lipitor 20: buy lipitor 20mg – cost of lipitor in canada
https://tamoxifen.bid/# tamoxifen citrate
buy misoprostol over the counter https://furosemide.win/# furosemide
lasix generic name
prinivil tabs lisinopril 40 mg pill 16 lisinopril
lipitor purchase online: Atorvastatin 20 mg buy online – lipitor 200 mg
https://lipitor.guru/# lipitor prescription drug
besivance price – buy carbocisteine pills for sale cheap sildamax for sale
furosemida 40 mg: cheap lasix – lasix tablet
purchase cytotec https://cytotec.pro/# Cytotec 200mcg price
lasix dosage
tamoxifen hair loss: buy tamoxifen online – tamoxifen headache
https://tamoxifen.bid/# tamoxifen bone pain
п»їcytotec pills online: Misoprostol price in pharmacy – п»їcytotec pills online
buy cytotec over the counter https://cytotec.pro/# order cytotec online
lasix 20 mg
cytotec abortion pill https://lisinopril.guru/# lisinopril 10
lasix 40 mg
cost of lipitor 10 mg: cheapest ace inhibitor – cheapest generic lipitor
cytotec abortion pill: Misoprostol price in pharmacy – Misoprostol 200 mg buy online
generic lipitor prices: buying lipitor from canada – order lipitor
furosemida: furosemide online – furosemide 40 mg
https://mexstarpharma.online/# pharmacies in mexico that ship to usa
http://easyrxcanada.com/# canadian pharmacy store
world pharmacy india: п»їlegitimate online pharmacies india – mail order pharmacy india
order benemid 500mg online – oral carbamazepine carbamazepine us
http://easyrxcanada.com/# canadian neighbor pharmacy
purchase celebrex pill – order celebrex generic buy indocin capsule
https://mexstarpharma.com/# mexican mail order pharmacies
http://easyrxindia.com/# top online pharmacy india
best india pharmacy: indian pharmacy – п»їlegitimate online pharmacies india
best canadian pharmacy to order from: canada drugs online – vipps approved canadian online pharmacy
top 10 online pharmacy in india: top 10 pharmacies in india – best india pharmacy
best online pharmacies in mexico: mexican pharmaceuticals online – medicine in mexico pharmacies
onlinecanadianpharmacy 24: canadapharmacyonline – legitimate canadian mail order pharmacy
https://slotsiteleri.bid/# deneme bonusu veren siteler
The balance and fairness in The writing make The posts a must-read for me. Great job!
https://slotsiteleri.bid/# en iyi slot siteleri 2024
buy diclofenac 100mg without prescription – order voltaren 50mg online order aspirin 75 mg generic
buy colospa – arcoxia 60mg generic cilostazol 100mg uk
https://sweetbonanza.network/# sweet bonanza yorumlar
deneme veren slot siteleri: deneme bonusu veren siteler – canl? slot siteleri
want to buy priligy in pakistan B, activation of caspase 3 caspase 7 upon treatment with single and combination therapy
http://sweetbonanza.network/# sweet bonanza demo oyna
yeni slot siteleri: deneme bonusu veren slot siteleri – slot bahis siteleri
guvenilir slot siteleri: yasal slot siteleri – canl? slot siteleri
http://slotsiteleri.bid/# yasal slot siteleri
slot bahis siteleri: deneme veren slot siteleri – en cok kazandiran slot siteleri
пин ап: pin up – пин ап казино
пин ап вход пинап казино пин ап вход
пинап казино: пин ап вход – pin up казино
вавада зеркало: vavada casino – вавада
https://1win.directory/# 1вин
vavada casino: vavada казино – vavada casino
http://pin-up.diy/# пинап казино
pin up: пин ап казино – pin up казино
pin up casino: пин ап зеркало – pin up казино
http://1win.directory/# 1вин
order pyridostigmine 60 mg without prescription – pyridostigmine us order azathioprine without prescription
https://easydrugrx.com/# australian online pharmacy viagra
india online pharmacy viagra
silkroad online pharmacy: fanda pharmacy hong kong cialis – giant food store phoenixville pharmacy
rumalaya sale – cheap shallaki pill amitriptyline us
https://drstore24.com/# Septra
best online pharmacy that does not require a prescription in india
viagra in australia pharmacy: which pharmacy has the best price on viagra – united pharmacy online