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

Adder

DEMO-C-32 • Programming in C

Browser-only practice

بيان المشكلة

Write a function int add(int a, int b) that returns the sum of two integers.

قيود

-1000

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

Two space-separated integers.

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

The sum as an integer.

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

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

العينة رقم 1
عينة ظاهرة
5 7
12
5 + 7 = 12.
العينة رقم 2
عينة ظاهرة
-5 5
0
-5 + 5 = 0.
العينة رقم 3
عينة ظاهرة
0 0
0
0 + 0 = 0.

Web terminal

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

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