CS508 Assignment No 02 Fall 2020 Solution / Discussion Due Date: 14-12-2020
Problem Statement:
Punctuation is the system of signs or symbols, given to a reader to show how a sentence is constructed and how it should be read and makes the meaning clear.
You are required to write a program in SNOBOL4 which will count the total number of punctuation characters in a string.
For example, if input string is
Good Morning! Mr. ABC, have your breakfast?
Then your program must print on console,
Found 4 punctuation marks (i.e. ! . , ?) in the given string.
However, in case, there is no punctuation mark in the input string then following message should be displayed.
Found no punctuation mark in the given string.
Note:
It is required to make sure that the program should count only one for same punctuation marks if repeated twice or more. For example, the program must count 4 punctuation marks for string "Yesterday, rain-fog; today, frost-mist. But how fascinating each."
For compilation purpose, you can use any online compiler, like https://tio.run/#snobol4
Punctuation Marks:
Punctuation Mark |
Symbol |
Punctuation Mark |
Symbol |
Apostrophe |
' |
Dash |
— |
Quotation Mark |
" |
Left Parentheses |
( |
Comma |
, |
Right Parentheses |
) |
Semicolon |
; |
Period |
. |
Colon |
: |
Question Mark |
? |
Hyphen |
- |
Exclamation Mark |
! |
Sample Output:
Tags:
#cs508assignment2solutionfall2020 #cs508assignmentsolution2020
CS508 Assignment 2 Solution Fall 2020 | CS508 Assignment Solution 2020
© 2021 Created by + M.Tariq Malik.
Powered by
Promote Us | Report an Issue | Privacy Policy | Terms of Service
We non-commercial site working hard since 2009 to facilitate learning Read More. We can't keep up without your support. Donate.
We are user-generated contents & non-commercial site. All product, videos, pictures & others contents on site don't seem to be beneath our Copyrights & belong to their respected owners & freely available on public domains. All Contents on site are for personal & non-commercial use.We believe in Our Policy & do according to them. If Any content is offensive in your Copyrights then please email at m.tariqmalik@gmail.com with copyright detail & We will happy to remove it immediately.
Management: Admins ::: Moderators
Awards Badges List | Moderators Group
All Members | Featured Members | Top Reputation Members | Angels Members | Intellectual Members | Criteria for Selection
Become a Team Member | Safety Guidelines for New | Site FAQ & Rules | Safety Matters | Online Safety | Rules For Blog Post