Digits vs Letters Code in C Language

EBK JAVA PROGRAMMING
8th Edition
ISBN:9781305480537
Author:FARRELL
Publisher:FARRELL
Chapter16: Graphics
Section: Chapter Questions
Problem 14RQ
icon
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
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
steps

Step by step

Solved in 4 steps with 5 images

Blurred answer
Knowledge Booster
Fundamentals of Boolean Algebra and Digital Logics
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.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781305480537
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT