Write programs using looping and switch statements to count all the punctuation marks
in a file. A shell program is given below as a staring point.
//Count punctuation marks in a file.
using namespace std;
int main ()
int periodCt = 0; //The total number of periods (.)
int commaCt = 0; //The total number of commas (,)
int questionCt = 0; //The total number of question marks (?)
int colonCt = 0; //The total number of colons (:)
int semicolonCt = 0; //The total number of semi-colons (;)
/* FILL IN HERE */
//Use a loop to read the input data file symbol by symbol
//As reading goes, check which type of punctuation the symbol belongs to
//and increment the corresponding counter.
//Once finishing with reading, print out the total counts of the punctuation marks.
Symbols in the file "switch.txt" are:
There are lots of symbols in this file: ..;;??.,.,.,