Advertisement
Guest User

Untitled

a guest
Jan 23rd, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. if(scanf("%d",&x1)!=1)
  2. {
  3. printf("Incorrect input");
  4. return 1;
  5. }
  6. printf("Podaj x2: ");
  7. if(scanf("%d",&x2)!=1)
  8. {
  9. printf("Incorrect input");
  10. return 1;
  11. }
  12. if(x1>x2)
  13. {
  14. printf("Incorrect input");
  15. return 1;
  16. }
  17. if(x1==x2)
  18. {
  19. printf("Nothing to show");
  20. return 0;
  21. }
  22. for(i=x1;i<=x2;i++)
  23. {
  24. if(is_twin(i,i+2)==1&&(i+2)<=x2)
  25. {
  26. printf("%d %d\n",i,i+2);
  27. licznik++;
  28. }
  29. }
  30. if(k==0)
  31. {
  32. printf("Nothing to show");
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement