programming design 3

A hashtag is a word or phrase preceded by a hash sign (#), used on social media websites and applications, especially Twitter, to identify messages on a specific topic. Hashtag ends at an invalid hashtag character (any character that is not a letter, digit, or underscore) or the end of the sentence. Write a program to check if a sentence entered by user contains a hashtag. If so, display the hashtag. If not, print a no hashtag message. If there are multiple hashtags in the input, display the first one

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published.