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)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Discover a treasure trove of wisdom within this insightful piece, highly respected in the nurturing DEV Community enviroment. Developers, whether novice or expert, are encouraged to participate and add to our shared knowledge basin.

A simple "thank you" can illuminate someone's day. Express your appreciation in the comments section!

On DEV, sharing ideas smoothens our journey and strengthens our community ties. Learn something useful? Offering a quick thanks to the author is deeply appreciated.

Okay