Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

in C# Problem 1 Royal Tweet British Monarchy @BritishMonarchy It is a pleasure to open the Information Age exhibition today at the @sciencemuseum and I

in C#

image text in transcribed

Problem 1 Royal Tweet British Monarchy @BritishMonarchy It is a pleasure to open the Information Age exhibition today at the @sciencemuseum and I hope people will enjoy visiting. Elizabeth R. On October 24, 2014, Britain's Queen Elizabeth II dipped a toe into 21st century communications when she posted her first tweet. Signing herself Elizabeth R, for regina or queen, she welcomed visitors to a new Information Age gallery focused on the evolution of modern communications at the Science Museum in London. The inaugural tweet (shown above) was posted to the official British monarchy Twitter feed, which has more than 700,000 followers. Your job is to write a program to scan a given number of tweets for how many mention the at symbol to the British Monarchy, BritishMonarchy. The username following the symbol in Twitter is case insensitive. Input The first line of input contains a single integer n, 1 sn 1000), which is the number of tweets that follow. Each tweet consists of a single line of input containing a string. Each string is of length n, (1 sn 140). All tweets are separated by a single blank line. Output Output the total tweets that contain the substring @BritishMonarchy (regardless of case) exactly in the format below. A given tweet that mentions BritishMonarchy more than once is legal and should not be double counted. Sample Input So excited that we can now tweet The Queen britishMonarchy!! :-) BritishMonarchy #Christmas is 6 weeks away!! #soClose Russ Rose would like to wish you all a Happy #Thanksgiving. #SNL BritishMonarchy's great grandson, heir to throne of BritishMonarchy Output Corresponding to Sample Input Total Tweets Containing @BritishMonarchy = 3

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions