Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Impara Challenge: Order Information | Gestione dei Tipi di Dati
Practice
Projects
Quizzes & Challenges
Quizzes
Challenges
/
Fondamenti di C#

bookChallenge: Order Information

Compito

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

Soluzione

Tutto è chiaro?

Come possiamo migliorarlo?

Grazie per i tuoi commenti!

Sezione 2. Capitolo 3
single

single

Chieda ad AI

expand

Chieda ad AI

ChatGPT

Chieda pure quello che desidera o provi una delle domande suggerite per iniziare la nostra conversazione

close

bookChallenge: Order Information

Scorri per mostrare il menu

Compito

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

Soluzione

Switch to desktopCambia al desktop per esercitarti nel mondo realeContinua da dove ti trovi utilizzando una delle opzioni seguenti
Tutto è chiaro?

Come possiamo migliorarlo?

Grazie per i tuoi commenti!

Sezione 2. Capitolo 3
single

single

some-alt