Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<bits/stdc++.h>
- using namespace std;
- int main(){
- string input;
- while( getline(cin,input) ){
- // cout << input << endl;
- if( (input[0] == '#' && input[1] == '#' && input[2] == '#') ||
- (input[0] == '/' && inpu t[1] == '*' && input[input.size()-2] == '*' && input[input.size()-1] == '/')
- || ( input[0] == '/' && input[1] == '#' && input[2] == '#') ) puts("It's a comment");
- else puts("Not a comment");
- }
- return 0;
- }
Add Comment
Please, Sign In to add comment