Guest User

Untitled

a guest
Oct 18th, 2017
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. #include<stdio.h>
  2. #include<string.h>
  3. #include<strings.h>
  4.  
  5. int main() {
  6. int i;
  7. char *name;
  8. /*
  9. int i;
  10. char *str;
  11. fprintf(stderr,"Are you sure you want to delete:: [y/n]:");
  12. scanf("%s",str);
  13. if(strcmp(str,"y") == 0) {
  14. fprintf(stderr,"Success\n");
  15. }
  16. else {
  17. fprintf(stderr,"Fail\n");
  18. }
  19.  
  20. return(0);
  21. */
  22. fprintf(stderr, "Enter your name:[y/n] " );
  23. scanf("%s", name );
  24. if( strcmp( name,"y") == 0 ){
  25. printf( "PASS!\n" );
  26. i=10;
  27. }
  28. else
  29. printf("FAIL\n");
  30. printf("i is --> %d\n",i);
  31. }
Add Comment
Please, Sign In to add comment