DEV Community

madina1575
madina1575

Posted on

C# dasturlash tilida Input qilish

Foydalanuvchidan ma'lumot qabul qilish uchun C# dasturlash tilida Console.ReadLine() buyrug'i ishlatiladi va bu buyrug' faqat string tipiga mansub.

Agar biz int, char, float kabi tipdagi ozgaruvchilarni qabul qilishni xohlasak Convert yoki Parse qilishimiz kerak bo'ladi

Image description

Bu yerda ikta o'zgaruvchi input qilingan va ular ustida amallar bajarilgan.

Natija quyidagicha bo'lishi mumkin:

Birinchi sonni kiriting: 15
Ikkinchi sonni kiriting: 4

Ikki sonning yig'indisi: 19
Ikki sonning ayirmasi: 11
Ikki sonning ko'paytmasi: 60
Ikki sonning bo'linmasi: 3
Bo'lingandagi qoldig'i: 1
Enter fullscreen mode Exit fullscreen mode

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Immerse yourself in a wealth of knowledge with this piece, supported by the inclusive DEV Community—every developer, no matter where they are in their journey, is invited to contribute to our collective wisdom.

A simple “thank you” goes a long way—express your gratitude below in the comments!

Gathering insights enriches our journey on DEV and fortifies our community ties. Did you find this article valuable? Taking a moment to thank the author can have a significant impact.

Okay