Digits vs Letters Code in C Language
Chapter16: Graphics
Section: Chapter Questions
Problem 14RQ
Related questions
Question
Digits vs Letters
Code in C Language
![Tests
Executions
main.c
There's a challenge going on in the arena. The champion of
all digits versus the champion of all letters. Fans, digits and
letters alike, all over the land come and watch the battle of
CE Run Tests
the legends!
Test Cases
I want you to count the letters and the digits of the string
inputted. Note that the string may also contain onlookers
like spaces and other special characters. Then output first
the ones who have more in number than the other. Example
O Test Case 1
when the number of digits is 25 where the number of
Your Output
letters is 36, I want you to print it as such: Letters 36 -
Digits 25. Similarly when it turns out that the digits lead in
number, print them first. If they are equal, just print the
digits first.
No Output
Expected Output
Enter string: sneur 3r34w4t $gdr&dr2#g864d sr
Input
Letters 17 - Digits 8
1. String of fans
Description
This includes numbers, digits, spaces, and special
characters.
O Test Case 2
Constraints
Length of the string does not exceed 100.
Sample
O Test Case 3
sneur 3r34w4t $gdr&dr2#g864d sr
O Test Case 4
Output
O Test Case 5 Hidden
Enter string: sneur 3r34w4t $gdr&dr2#g864d sr
Letters 17- - Digits 8
O Test Case 6
Hidden](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Febbc6c99-ab09-487d-af44-8d1b5647f516%2Feb226b2f-fb0d-4f24-a374-d25a371687df%2F8kc6e5_processed.png&w=3840&q=75)
Transcribed Image Text:Tests
Executions
main.c
There's a challenge going on in the arena. The champion of
all digits versus the champion of all letters. Fans, digits and
letters alike, all over the land come and watch the battle of
CE Run Tests
the legends!
Test Cases
I want you to count the letters and the digits of the string
inputted. Note that the string may also contain onlookers
like spaces and other special characters. Then output first
the ones who have more in number than the other. Example
O Test Case 1
when the number of digits is 25 where the number of
Your Output
letters is 36, I want you to print it as such: Letters 36 -
Digits 25. Similarly when it turns out that the digits lead in
number, print them first. If they are equal, just print the
digits first.
No Output
Expected Output
Enter string: sneur 3r34w4t $gdr&dr2#g864d sr
Input
Letters 17 - Digits 8
1. String of fans
Description
This includes numbers, digits, spaces, and special
characters.
O Test Case 2
Constraints
Length of the string does not exceed 100.
Sample
O Test Case 3
sneur 3r34w4t $gdr&dr2#g864d sr
O Test Case 4
Output
O Test Case 5 Hidden
Enter string: sneur 3r34w4t $gdr&dr2#g864d sr
Letters 17- - Digits 8
O Test Case 6
Hidden
Expert Solution
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 4 steps with 5 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
![EBK JAVA PROGRAMMING](https://www.bartleby.com/isbn_cover_images/9781305480537/9781305480537_smallCoverImage.jpg)
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781305480537
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
![EBK JAVA PROGRAMMING](https://www.bartleby.com/isbn_cover_images/9781305480537/9781305480537_smallCoverImage.jpg)
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781305480537
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT