[Latest News][6]

Android
Apple - İOS
Aşk & Sevgi
Eğitim
Film & Sinema
Genel Kültür
Müzik Dünyası
Oyun Tanıtımı
Oyunu Scriptleri
Programlama Dersleri
Sağlık Makaleleri
Spor Genel
Teknoloji Haberleri
Web Dersleri
Web Dizayn - Grafik
Web Scriptleri
Web Temaları
Yemek Tarifleri

Featured Post

C SHARP – FORM APPLİCATİON UYGULAMA İNDİRME SİMÜLASYONU

Bu ufak örnekte ilk formda seçilen radio button’un cheched change özelliğini kullanarak ikinci forma ilk formda seçilen değer public bir değ...

JAVA – SAYI TEK Mİ? ÇİFT Mİ?

Kullanıcıdan sayıyı aldıktan sonra sayının modunu alıp kalan değere bakarak if else ile tek veya çift olduğunu ekrana yazdırıyoruz.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package hafta2;
 
import java.util.*;
public class Hafta2 {
 
     
    public static void main(String[] args) {
      
        Scanner giris=new Scanner(System.in);
        int birsayi;
        System.out.print("Bir sayı girin");
        birsayi=giris.nextInt();
         
        if (birsayi %2==0) {
            System.out.print("Sayı Çift Sayıdır");
             
        }
        else {
        System.out.print("Sayı Tek Sayıdır");
        }
    }
     
}

About Author Mohamed Abu 'l-Gharaniq

when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries.

Hiç yorum yok:

Yorum Gönder

Start typing and press Enter to search