Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Big Data Fundamentals Concepts, Drivers & Techniques

Authors: Thomas Erl, Wajid Khattak, Paul Buhler

1st Edition

0134291204, 9780134291208

More Books

Students also viewed these Databases questions