Challenge: Order Information
Tarea
Swipe to start coding
Complete the code to declare variables with explicit types and print order information.
- Declare an
intvariable for order number and assign1001; - Declare an
intvariable for quantity and assign3; - Declare a
longvariable for price per item and assign5000; - Calculate the total order price by multiplying quantity by price per item, and store the result in a
longvariable; - Use
Console.WriteLineto 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
Solución
¿Todo estuvo claro?
¡Gracias por tus comentarios!
Sección 2. Capítulo 3
single
Pregunte a AI
Pregunte a AI
Pregunte lo que quiera o pruebe una de las preguntas sugeridas para comenzar nuestra charla
Genial!
Completion tasa mejorada a 1.25
Challenge: Order Information
Desliza para mostrar el menú
Tarea
Swipe to start coding
Complete the code to declare variables with explicit types and print order information.
- Declare an
intvariable for order number and assign1001; - Declare an
intvariable for quantity and assign3; - Declare a
longvariable for price per item and assign5000; - Calculate the total order price by multiplying quantity by price per item, and store the result in a
longvariable; - Use
Console.WriteLineto 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
Solución
¿Todo estuvo claro?
¡Gracias por tus comentarios!
Sección 2. Capítulo 3
single