C++ DASURLASH TILIDA MEN SIZGA IF
TUSHUNTIRIB 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;
}
Top comments (1)
zo'r aka