Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <stdio.h>
- #include <stdlib.h>
- #include <cstring>
- #define MAXLEN 200
- #define Alpha 26
- using namespace std;
- char S1[MAXLEN], S2[Alpha];
- int i=0,j=0,counter=0, alphacounter=0;
- char c;
- int main()
- {
- S1[i]=cin.get();
- while (S1[i] != '.')
- {
- if ((S1[i] >='a' && S1[i]<='z') || (S1[i] >='A' && S1[i]<='Z') ){
- if (alphacounter != 27)
- alphacounter++;}
- counter++;
- i++;
- S1[i]=cin.get();
- }
- cout << "Characters Entered : " << counter;
- cout << endl;
- cout << "Alphabetical Characters : " << alphacounter;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment