السابق التالي
0 / 15
الوحدة النمطية DEMO-33-73DEMO-OOP-33

Nullable Discount Engine

DEMO-OOP-33 • Object Oriented Programming

Browser-only practice

بيان المشكلة

Read a raw price and raw discount percentage, then print the final price. Handle missing data and invalid numbers explicitly.

تنسيق الإدخال

Input is given as whitespace-separated raw tokens exactly in the order described by the problem statement.

تنسيق الإخراج

Print the exact success report or exact error message required by the problem.

حالات اختبار نموذجية

Submit runs every public testcase in this browser. Results and code never leave this device.

العينة رقم 1
عينة ظاهرة
100.0
10.0
Final Price: 90.00
Input: raw price = "100.0", raw discount = "10.0".
Derivation: finalPrice = 100.00 * (1 - (10.00 / 100)) = 90.00 | "Final Price: " + "90.00" = "Final Price: 90.00".
Output:
Final Price: 90.00
العينة رقم 2
عينة ظاهرة
50
5
Final Price: 47.50
Input: raw price = "50", raw discount = "5".
Derivation: finalPrice = 50.00 * (1 - (5.00 / 100)) = 47.50 | "Final Price: " + "47.50" = "Final Price: 47.50".
Output:
Final Price: 47.50

Web terminal

C, C++, Java, and Python run locally in a browser VM. No worker or visualizer is used.

Saved in this browser
إعدادات المحرر