Created
November 6, 2019 13:53
-
-
Save gitaficionado/65deace78c9ffc94e0b9df20a691864f to your computer and use it in GitHub Desktop.
(Count uppercase letters) Write a program that prompts the user to enter a string and displays the number of the uppercase letters in the string.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class CountUppercaseLetter_Exercise05_50 { | |
public static void main(String[] args) { | |
java.util.Scanner input = new java.util.Scanner(System.in); | |
System.out.print("Enter a string: "); | |
// Create a string with user input | |
_______________________________________ | |
//Create a variable of int type called total | |
____________________ | |
// create a for statement that recognizes whether a string contains capital letters. | |
System.out.println("The number of uppercase letters is " + | |
total); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment