Question: Problem 1 :Write a program that reads a line of input into a single String object. Use loops to do the following: Print all digits

Problem 1:Write a program that reads a line of input into a single String object. Use loops to do the following:
Print all digits in the String. Print the digits on one line, with a blank in between each digit.
Print all lowercase letters in the String. Print the letters on one line, with a blank in between each letter.
Print all uppercase letters in the String. Print the letters on one line, with a blank in between each letter.
Print the number of blanks in the String.
Print the number of digits in the String.
Print the number of lowercase letters in the String.
Print the number of uppercase letters in the String. Sample Output:
Please enter a String: Welcome to CSC 161!
The digits are: 161
The lower case letters are: e l c o m e t o
The upper case letters are: W C S C
The number of blanks are: 3
The number of digits are: 3
The number of lowercase letters are: 8
The number of upper case letters are: 4

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!