Notes![what is notes.io? What is notes.io?](/theme/images/whatisnotesio.png)
![]() ![]() Notes - notes.io |
#include <time.h>
#include <stdlib.h>
#include <locale.h>
int main() {
setlocale(LC_ALL, "Turkish");
printf("***SAYI TAHMİN OYUNU***nn");
int altSinir, ustSinir;
int tahmin, deneme = 0;
while (1) {
printf("Alt ve üst sınırları giriniz (min: 0 max: 32767)n");
printf("Alt sınır ve üst sınırı giriniz: ");
// Eğer harf girilirse uyarı verip tekrar giriş yapmasını sağla
if (scanf("%d%d", &altSinir, &ustSinir) != 2) {
printf("Geçersiz cevap verdiniz. Lütfen sayı giriniz.n");
// Hatalı girişi temizle
while (getchar() != 'n');
continue; // Döngüyü tekrar başlat
}
break; // Geçerli giriş yapıldığında döngüden çık
}
srand(time(0));
int rastgele = rand() % (ustSinir - altSinir + 1) + altSinir;
do {
printf("%d ile %d arasında bir sayı tuttum. Tahminin: ", altSinir, ustSinir);
// Kullanıcının harf girmesi durumunda kontrol et
if (scanf("%d", &tahmin) != 1) {
printf("Geçersiz cevap verdiniz. Lütfen sayı giriniz.n");
// Hatalı girişi temizle
while (getchar() != 'n');
continue; // Döngüyü tekrar başlat
}
deneme++;
if (tahmin == rastgele) {
printf("Tebrikler! %d denemede kazandın. :)n", deneme);
} else if (tahmin < rastgele) {
printf("Daha büyük bir sayı giriniz.n");
} else {
printf("Daha küçük bir sayı giriniz.n");
}
} while (tahmin != rastgele);
return 0;
}
![]() |
Notes is a web-based application for online taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000+ notes created and continuing...
With notes.io;
- * You can take a note from anywhere and any device with internet connection.
- * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
- * You can quickly share your contents without website, blog and e-mail.
- * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
- * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.
Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.
Easy: Notes.io doesn’t require installation. Just write and share note!
Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )
Free: Notes.io works for 14 years and has been free since the day it was started.
You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;
Email: [email protected]
Twitter: http://twitter.com/notesio
Instagram: http://instagram.com/notes.io
Facebook: http://facebook.com/notesio
Regards;
Notes.io Team