Data types

umida5 - Oct 14 - - Dev Community
  • int - butun sonlar saqlaydi.
    int:
    4 bayt
    -2,147,483,648 dan 2,147,483,647 gacha

  • double - kasr sonlar saqlaydi.
    double:
    8 bayt
    ~15-17 raqam
    ±5.0 x 10^−324 dan ±1.7 x 10^308 gacha

  • bool - (1 bayt) mantiqiy qiymatlar (true yoki false) : 1 yoki 0.

  • char - maxsus belgilar uchun (unicode belgilari)

  • decimal - decimal turi moliyaviy va aniq hisob-kitoblar uchun ishlatiladi.

decimal:
16 bayt
28-29 raqam
±1.0 x 10^−28 dan ±7.9 x 10^28 gacha


int yosh = 25;
float harorat = 36.6;
double masofa = 12345.6789;
decimal balans = 1000.75m;
bool isactive = true;
char belgi = 'A';
Enter fullscreen mode Exit fullscreen mode
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .