Advertisement
Guest User

Untitled

a guest
Feb 20th, 2020
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. #include<stdio.h>
  2. #include<string.h>
  3. int main()
  4. {
  5.  
  6. int i ,l;
  7. char x[120];
  8. gets(x);
  9.  
  10.  
  11. if(x[0]=='/' && x[1]=='/'){
  12. printf("comment");
  13.  
  14. }
  15. if(x[0]=='/' && x[1]=='*')
  16. { l=strlen(x);
  17. if(x[l-1]=='/'&& x[l-2]=='*'){
  18. printf("comment");
  19. }
  20. }
  21.  
  22.  
  23.  
  24. else{
  25. printf("Not comment");
  26.  
  27.  
  28. }
  29.  
  30.  
  31.  
  32.  
  33. return 0;
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement