Advertisement
Guest User

Untitled

a guest
Mar 29th, 2015
256
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <string.h>
  3.  
  4. int main(int argc, char* argv[])
  5. {
  6. int x;
  7. int y;
  8. bool z = false;
  9. const char *b;
  10.  
  11. if(argc != 3)
  12. {
  13. printf("ERROR\n");
  14. }
  15. else
  16. {
  17. FILE *agent = fopen( argv[1], "r");
  18. FILE *dict = fopen( argv[2], "r");
  19.  
  20. if( agent == 0 || dict == 0)
  21. {
  22. printf("ERROR\n");
  23. }
  24. else
  25. {
  26. if( z == false)
  27. {
  28. while(x = fgetc(agent) != EOF)
  29. {
  30. for(int n = -50; n < 51; n++)
  31. {
  32. x = x + n;
  33. const char *dict;
  34. const char *agent;
  35. b = strstr(dict, agent);
  36. printf("%s\n", b);
  37. }
  38. }
  39. if(z == true)
  40. {
  41. z = true;
  42. }
  43. else
  44. {
  45. z = false;
  46. }
  47. }
  48. else
  49. {
  50. printf("x\n");
  51. }
  52. }
  53. }
  54.  
  55.  
  56. return 0;
  57. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement