Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <cstdlib>
- #include <iostream>
- #include <string.h>
- using namespace std;
- int main(){
- char Q1[100];
- string Q = "Must you be so linear, Jean-Luc 0 123";
- cin.getline(Q1, 99);
- if(strlen(Q1) > 1) Q = Q1;
- int i,j=0,k=1,b=0;
- string a;
- for ( i = b;i<100;++i){
- if ((Q[i]>='A'&&Q[i]<='Z')||(Q[i]>='a'&&Q[i]<='z')||(Q[i]='-'))
- a=a+Q[i];
- else
- b=i+1;
- cout<<k<<':'<<a<<endl;
- ++k;
- j=0;
- }
- system("PAUSE");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment