Write a program to count and print the total number of characters (lowercase english alphabets only),...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Write a program to count and print the total number of characters (lowercase english alphabets only), digits (0 to 9) and white spaces (single space, tab i.e. 'It' and newline i.e. '\n') entered till '$'. That is, input will be a stream of characters and you need to consider all the characters which are entered till '$'. Print count of characters, count of digits and count of white spaces respectively (separated by space). Input Format : A stream of characters terminated by '$' Output Format : Write a program to count and print the total number of characters (lowercase english alphabets only), digits (0 to 9) and white spaces (single space, tab i.e. 'It' and newline i.e. '\n') entered till '$'. That is, input will be a stream of characters and you need to consider all the characters which are entered till '$'. Print count of characters, count of digits and count of white spaces respectively (separated by space). Input Format : A stream of characters terminated by '$' Output Format :
Expert Answer:
Answer rating: 100% (QA)
Hi All Thanks for the giving opportunity PF below code for my resu... View the full answer
Related Book For
Data Structures and Algorithm Analysis in Java
ISBN: 978-0132576277
3rd edition
Authors: Mark A. Weiss
Posted Date:
Students also viewed these computer engineering questions
-
Write a program to print Hello World 25 times without writing a single line in the main function except system(pause).
-
Write a program to compute word ladders where single-character substitutions have a cost of 1, and single-character additions or deletions have a cost of p > 0, specified by the user. As mentioned at...
-
Write an SQL query to determine the total number of hours and the total number of lessons Tutor 106 taught in June and July 2015.
-
2 3 -4 6,-12,-18 If A = (a) 0 3a 2b 24 (b) -6,4,9 and KA= then the value of k, a,b are respectively (c) -6,-4,-9. (d) -6,12,18
-
Answer the following questions using the data from Problem 14.65: a. Calculate the coefficient of determination. b. Using = 0.05, test the significance of the population coefficient of...
-
A random sample of eight homes in a particular suburb had the following selling prices (in thousands of dollars): 192 183 312 227 309 396 402 390 a. Check for evidence of nonnormality. b. Find a...
-
(a) How many variables are included in the scatterplot in Figure 2.84(a)? Identify each as categorical or quantitative. Estimate the range for Variable1 and for Variable2. (b) In Figure 2.84(a), does...
-
Sarah Edwards, division manager for Pillows Plus, is speaking to the controller, Diana Rothman, about the budgeting process. Sarah states, Im not an accountant, so can you explain the three main...
-
2-1. GASB Concepts Statement No. 3 discusses various methods of communicating financial accounting information to users. One method is using required supple- mentary information (RSI). What is RSI,...
-
The Davis Lamp Company (DLC) is a wholesale company that purchases lamps from the manufacturer and resells them to retail stores. The company has three inventory items: desk lamps, table lamps, and...
-
You're shopping for a new car. One car that you really liked costs $28,000. You are planning to fully finance this purchase. The loan contract requires fixed monthly payments for 4 years, at 5...
-
a. Use Data|Table to graph the function f(x) = 3 x 2 ? 2 x ? 15, as illustrated below: b. Use Solver or Goal|Seek to find two values of x for which f(x) = 0. A D E G H USING DATA TABLE TO GRAPH A...
-
Determine at least ten key success factors (key financial indicators) to benchmark in any hospital.
-
What is the funds Sharpe ratio?
-
Work Prob. 13.53 for the NRTL equation. Prob. 13.53 For the acetone(1)/methanol(2)/water(3) system, based on Eq. (13.19) and the Wilson equation, make the following calculations: (a) BUBL T : P =...
-
Plot the average number of phonons for at least five values of T to show its evolution with increasing temperatures. For each one, plot the function and show that it is a good approximation for N()...
-
"Girl" and Kate Chopin's "The Story of an Hour" have some similarities and differences that are important. As you read "Girl," try to determine the point of view and setting. Do a quick Google search...
-
Two mutually exclusive investment alternatives are being considered. Alternative A requires an initial investment of $20,000 in a machine. Annual operating and maintenance costs are anticipated to be...
-
Once the suffix array is constructed, the short routine shown in Figure 12.50 can be invoked from Figure 12.32 to create the longest common prefix array. a. In the code, what does rank[i] represent?...
-
Suppose T1(N) = O(f (N)) and T2(N) = O(f (N)). Which of the following are true? a. T1(N) + T2(N) = O(f (N)) b. T1(N) T2(N) = o(f (N)) c. T1(N) / T2(N) = O(1) d. T1(N) = O(T2(N))
-
a. Prove that in a round robin tournament it is always possible to arrange the players in an order pi1 , pi2 , . . . , piN such that for all 1 j < N, pij has won the match against pij+1. b. Give an...
-
Who was Phar-Mors flamboyant Chief Executive Officer?
-
Which of the following generally is not considered something of value? 1. Cash, money or checks 2. Airline miles or hotel credits associated with frequent activity (e.g., frequent flier miles) 3. An...
-
Which of the following is not one of the five major categories of fraudulent disbursements? 1. Payroll schemes 2. Expense reimbursement schemes 3. Shell company schemes 4. Billing schemes
Study smarter with the SolutionInn App