DEV Community

Cover image for INPUT
Sabrina
Sabrina

Posted on

INPUT

Input

Console qiymat kiritish uchun Console.ReadLine() - buyrug'idan foydalanamiz.
Console.ReadLine() - bu string tipiga mansub.
Interpolation - bu qo'shtirnoq ichida o'zgaruvchilardan foydalanish imkoniyatini beradi.

Masala : 4 xonali son berilgan.Sonning o'nlar va minglar xonasidagi raqamlar ko'paytmasini aniqlovchi dastur tuzing.
Yechimi:

class Program 
{
     static void Main()
     {
        int a = Convert.ToInt32(Console.ReadLine());;
        int b = a / 100 % 10;
        int c =  a /10 % 10;
        Console.WriteLine(b * c);
     }
Enter fullscreen mode Exit fullscreen mode

Top comments (1)

Collapse
 
mushtariy profile image
Mushtariy

shik shak shok