import java.util.Scanner;
public class Program_6 {
public static void main(String[] args) {
int count = 0;
Scanner scan = new Scanner(System.in);
String str = scan.next();
for (int i = 0; i < str.length(); i++) {
if (Character.isUpperCase(str.charAt(i))) {
count++;
}
}
System.out.println("No of Capital Letters:" + count);
}
}
Find all the practical at one place of Gujarat Technological University(GTU) With Solutions.
Friday, September 21, 2018
Write a program to count the number of words that start with capital letters.
Subscribe to:
Post Comments (Atom)
-
A country has a capital city A dining philosopher uses a fork A file is an ordinary file or a directory file Files cont...
-
import java.io.*; public class Dataio { public static void main(String args[]) throws IOException { DataInputStr...
No comments:
Post a Comment