Count how many uppercase letters are in the input. Program must have a function called count_upper that takes two arguments: an integer denoting the length a character sequence and a string representing the character sequence. It counts the number of uppercase letters found in the character sequence. It returns an integer value indicating how many uppercase letters the sequence contains.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
In C++ program, please show the output of this program
Sample Test Cases:
#
0
2
2
3 abc
5 Abcde
3
5 UNiTy
7 jEjEmOn
8 p@shp@sh
4
m
3 AAA
4 #Rmg
2 ур
2 SF
Input
0
1
2
3
Invalid character
3
Invalid character
Output
Transcribed Image Text:Sample Test Cases: # 0 2 2 3 abc 5 Abcde 3 5 UNiTy 7 jEjEmOn 8 p@shp@sh 4 m 3 AAA 4 #Rmg 2 ур 2 SF Input 0 1 2 3 Invalid character 3 Invalid character Output
Problem:
Count how many uppercase letters are in the input.
Program must have a function called count_upper that takes two arguments: an integer
denoting the length a character sequence and a string representing the character sequence. It
counts the number of uppercase letters found in the character sequence. It returns an integer
value indicating how many uppercase letters the sequence contains.
Input Format:
Input begins with an integer Nindicating how many character sequences are in the input.
Succeeding lines begin with an integer tindicating how many characters ch follow.
Output Format:
For each input, output how many uppercase letters are found.
Constraint:
1 <= N <= 100
1 <= t <= 100
ch could be any letter in the alphabet (lowercase or uppercase)
Transcribed Image Text:Problem: Count how many uppercase letters are in the input. Program must have a function called count_upper that takes two arguments: an integer denoting the length a character sequence and a string representing the character sequence. It counts the number of uppercase letters found in the character sequence. It returns an integer value indicating how many uppercase letters the sequence contains. Input Format: Input begins with an integer Nindicating how many character sequences are in the input. Succeeding lines begin with an integer tindicating how many characters ch follow. Output Format: For each input, output how many uppercase letters are found. Constraint: 1 <= N <= 100 1 <= t <= 100 ch could be any letter in the alphabet (lowercase or uppercase)
Expert Solution
steps

Step by step

Solved in 4 steps with 4 images

Blurred answer
Knowledge Booster
Types of Function
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education