DEV Community

abdukarim0126
abdukarim0126

Posted on

Mavzu: 'Alifbo 🤔'

C++ DASURLASH TILIDA MEN SIZGA IFTUSHUNTIRIB BERAMAN

.
.
.
.
.
.
.
.
.
.
.
.
.
.
👇

#include <iostream>

using namespace std;

int main()
 {
    char ch;

    // Foydalanuvchidan belgi olish
    cout << "Bir belgi kiriting: ";

    cin >> ch;

    // Belgi alifbo harfi bo'lsa 1 ni, aks holda 0 ni chiqarish
    if ((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z'))
 {
        cout << "1" << endl; // Alifbo harfi
 }
 else 
{
        cout << "0" << endl; // Alifbo harfi emas
    }

    return 0;
}

Enter fullscreen mode Exit fullscreen mode

Top comments (1)

Collapse
 
sunnat2009 profile image
sunnat2009

zo'r aka