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

Hollow Rectangle

DEMO-C-32 • Programming in C

Browser-only practice

بيان المشكلة

Write a program that reads two integers R and C and prints a hollow rectangle of stars.

قيود

1 <= R, C <= 20

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

Two integers R and C (1 <= R, C <= 20).

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

A hollow rectangle of stars.

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

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

العينة رقم 1
عينة ظاهرة
3 5
*****
*   *
*****
Input: 3 5
العينة رقم 2
عينة ظاهرة
2 6
******
******
Input: 2 6
العينة رقم 3
عينة ظاهرة
1 1
*
Input: 1 1
العينة رقم 4
عينة ظاهرة
3 3
***
* *
***
Input: 3 3

Web terminal

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

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