السابق التالي
0 / 20
الوحدة النمطية DEMO-32-89DEMO-C-32

Power Function

DEMO-C-32 • Programming in C

Browser-only practice

بيان المشكلة

Write a program that reads two floating-point numbers base and exponent and calculates base raised to the power of exponent using the pow function.

Target difficulty: Easy

قيود

None specific

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

Two floating-point numbers separated by a space.

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

The result formatted to 2 decimal places.

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

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

العينة رقم 1
عينة ظاهرة
2.0 3.0
8.00
2.0^3.0 = 8.00
العينة رقم 2
عينة ظاهرة
10.0 0.0
1.00
10.0^0.0 = 1.00
العينة رقم 3
عينة ظاهرة
3.0 3.0
27.00
3.0^3.0 = 27.00
العينة رقم 4
عينة ظاهرة
4.0 0.5
2.00
4.0^0.5 = 2.00

Web terminal

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

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