Write a
I say Hi.
should produce output similar to the following:
3Â words
1Â a
1Â h
2Â i
1Â s
1Â y
Learn your wayIncludes step-by-step video
Chapter 9 Solutions
Absolute C++
Additional Engineering Textbook Solutions
Java: An Introduction to Problem Solving and Programming (8th Edition)
Using MIS (10th Edition)
Artificial Intelligence: A Modern Approach
Web Development and Design Foundations with HTML5 (9th Edition) (What's New in Computer Science)
Computer Science: An Overview (12th Edition)
Starting Out With Visual Basic (7th Edition)
- Write a program that takes in an integer in the range 20-98 as input. The output is a countdown starting from the integer, and stopping when both output digits are identical. Ex: If the input is 93, the output is: 93 92 91 90 89 88 Ex: If the input is 77, the output is: 77 Ex: If the input is not between 20 and 98 (inclusive), the output is: Input must be 20-98 For coding simplicity, follow each output number by a space, even the last one. Use a while loop. Compare the digits; do not write a large if-else for all possible same-digit numbers (11, 22, 33, ..., 88), as that approach would be cumbersome for large ranges.arrow_forwardWrite a program that reads an integer age of kids, finds the maximum of them, and counts its occurances, finds the minimum of them, and counts its occurances. And Find the average ages. Assum that the input ends with number -1.arrow_forward: Write a java program that count the number of letters in a String and find the first occurrence of S, U, I, T in the String and return indices of S, U, I, T. Join the three initialized Strings string1, string2, and string3. Count the number of white spaces in the complete string. Use toUpperCase() and replaceAll("\\s", "") methods to convert string into Upper Case and remove all white Spaces from the string. Count the number of letters in the string. Find the first occurrence of S, U, I, T in the String and return indices of S, U, I, T. Strings are given below: String string1 = "Globalization and Information Technology continue to process at a dramatic pace" String string2 = "To answer the demand of a changing society Pakistan higher education system needs to shift its focus from individuals who simply absorb knowledge to those who are able to creatively utilize knowledge to excel in unfamiliar situations"; String string3 = "These creative individuals should be able to track…arrow_forward
- Write a program that converts an ASCII text string from memory into all lowercase and stores the output to memory. The input string can contain uppercase and lowercase letters as well as spaces, punctuation (period, comma, question mark, exclamation point), and decimal digits. The input string will be null-terminated (that is, end with a 0 byte) and the output string is also to be null-terminated. (Observe: a 0 byte is different than the ASCII code for decimal digit 0 , which is 0x30.) Example: Convert the string "IN 2023, faLL stARTs on September 23." to "in 2023, fall starts on september 23.".arrow_forwardWrite a program that accepts a year written as a four-digit Arabic (ordinary) numeral and outputs theyear written in Roman numerals. Important Roman numerals are V for 5, X for 10, L for 50, C for 100, Dfor 500, and M for 1,000. Recall that some numbers are formed by using a kind of subtraction of oneRoman “digit”; for example, IV is 4 produced as V minus I, XL is 40, CM is 900, and so on. A few sampleyears: MCM is 1900, MCML is 1950, MCMLX is 1960, MCMXL is 1940, MCMLXXXIX is 1989. Assume theyear is between 1000 and 3000. Your program should include a loop that lets the user repeat thiscalculation until the user says she or he is donearrow_forwardWrite a complete Java program that reads in a line of text containing exactlythree words (separated by any kind or amount of whitespace) and outputs theline with spacing corrected; that is, the output has no space before the firstword and exactly one space between each pair of adjacent words.arrow_forward
- write a program that allows the input of a string from the user and prints the longest word in that string and its length. If there are multiple words with the same maximum length you must print the first one only.arrow_forwardWrite a program that translates a letter grade into a number grade. Letter grades are A, B, C, D, and E, possibly followed by + or -. Their numeric values are 4, 3, 2, 1, and 0. There is no F+ or F-. A + increases the numeric value by O.3, a – decreases it by 0.3. However, an A+ has value 4.0. Enter a letter grade: B- The numeric value is 2.7.arrow_forwardWrite a python program that takes a string as an input from the user and checks if there are any groups of THREE consecutive vowels. The input string will be a random combination of small letter and capital letter characters. Then replace all the three consecutive vowels with “#” character. So, the presence of such a group is ensuredarrow_forward
- Write a Java program that takes the user to provide a single character from thealphabet. Print Vowel or Consonant, depending on the user input. If the user input isnot a letter (between a and z or A and Z), or is a string of length > 1, print an errormessagearrow_forwardWrite a program that reads from stdin and filters out duplicate lines of input. It should read lines from stdin, and then print each unique line along with a count of how many times it appeared. Input is case-sensitive, so “hello” and “Hello” are not duplicates. There can be an arbitrary number of strings, of arbitrary length. Note that only adjacent duplicates count, so if the input were the lines “hello”, “world”, and “hello” again, all three would be treated as unique. ./uniqhellohellohelloworldworld^D # close stdin3 hello2 world ./uniqhelloworldhello^D # close stdin1 hello1 world1 helloarrow_forwardWrite a Program that take 2 string from user and print the whole with greetings. Those 2 strings are first name and last name in javaarrow_forward
- C++ Programming: From Problem Analysis to Program...Computer ScienceISBN:9781337102087Author:D. S. MalikPublisher:Cengage Learning