Question: Write a program whose input is a character and a string, and whose output indicates the number of times the character appears in the

Write a program whose input is a character and a string, and whose output indicates the number of times the

Write a program whose input is a character and a string, and whose output indicates the number of times the character appears in the string. The output should include the input character and use the plural form, n's, if the number of times the characters appears is not exactly 1. Ex if the input is Monday the output is in Ex: if the input is Today is Monday the output is O z's Ex: if the input is n It's a sunny day the output is 20's Case matters Ex: if the input is Nobody the output is: On's n is different than N LAB ACTIVITY 4.15.1: LAB: Count characters 1 import java.util.Scanner; 3 public class LabProgram ( 4 public static void main(String[] args) { /Type your code here. } LabProgram.java 0/10 Load default template...

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

or cc share s LabProgramjava 1 import javautilScanner 2 public class LabPr... View full answer

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 Programming Questions!