iamyeasin

Untitled

Feb 3rd, 2019
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. #include<bits/stdc++.h>
  2.  
  3. using namespace std;
  4.  
  5. int main(){
  6. string input;
  7.  
  8. while( getline(cin,input) ){
  9. // cout << input << endl;
  10. if( (input[0] == '#' && input[1] == '#' && input[2] == '#') ||
  11. (input[0] == '/' && inpu t[1] == '*' && input[input.size()-2] == '*' && input[input.size()-1] == '/')
  12. || ( input[0] == '/' && input[1] == '#' && input[2] == '#') ) puts("It's a comment");
  13.  
  14. else puts("Not a comment");
  15.  
  16. }
  17.  
  18. return 0;
  19. }
Add Comment
Please, Sign In to add comment