Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Вивчайте Challenge: Order Information | Робота з Типами Даних
Основи C#

bookChallenge: Order Information

Завдання

Swipe to start coding

Complete the code to declare variables with explicit types and print order information.

  • Declare an int variable for order number and assign 1001;
  • Declare an int variable for quantity and assign 3;
  • Declare a long variable for price per item and assign 5000;
  • Calculate the total order price by multiplying quantity by price per item, and store the result in a long variable;
  • Use Console.WriteLine to print the order number, quantity, price per item, and total price, each on a separate line.

Example output:

Order number: 1001
Quantity: 3
Price per item: 5000
Total price: 15000

Рішення

Все було зрозуміло?

Як ми можемо покращити це?

Дякуємо за ваш відгук!

Секція 2. Розділ 3
single

single

Запитати АІ

expand

Запитати АІ

ChatGPT

Запитайте про що завгодно або спробуйте одне із запропонованих запитань, щоб почати наш чат

close

bookChallenge: Order Information

Свайпніть щоб показати меню

Завдання

Swipe to start coding

Complete the code to declare variables with explicit types and print order information.

  • Declare an int variable for order number and assign 1001;
  • Declare an int variable for quantity and assign 3;
  • Declare a long variable for price per item and assign 5000;
  • Calculate the total order price by multiplying quantity by price per item, and store the result in a long variable;
  • Use Console.WriteLine to print the order number, quantity, price per item, and total price, each on a separate line.

Example output:

Order number: 1001
Quantity: 3
Price per item: 5000
Total price: 15000

Рішення

Switch to desktopПерейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів
Все було зрозуміло?

Як ми можемо покращити це?

Дякуємо за ваш відгук!

Секція 2. Розділ 3
single

single

some-alt