Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace CountOfCapitalLettersInArray7
- //Read an array of strings and find out how many of them
- //are capital English letters(such as A, B, C etc.).
- // Print the count on the console.
- {
- public class CountOfCapitalLettersInArray7
- {
- public static void Main(string[] args)
- {
- string someWors = Console.ReadLine();
- var counter = 0;
- for (int i = 0; i < someWors.Length; i++)
- {
- if (someWors[i]>=65 && someWors[i]<=90)
- {
- counter++;
- }
- }
- Console.WriteLine(counter);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement