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

Count Digits

DEMO-C-32 • Programming in C

Browser-only practice

بيان المشكلة

Write a program that scans a string and counts how many numeric digit characters (0-9) it contains.

قيود

Max string length: 100

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

Input:

String S

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

Output:

Count

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

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

العينة رقم 1
عينة ظاهرة
Date#1
1
There are 1 digits in the string Date#1.
العينة رقم 2
عينة ظاهرة
Bug#19
2
There are 1 digits in the string Bug#9.
العينة رقم 3
عينة ظاهرة
Vue!7
1
There are 1 digits in the string Vue!7.
العينة رقم 4
عينة ظاهرة
Packet?1
1
There are 1 digits in the string Packet?1.

Web terminal

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

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