Advertisement
Guest User

Untitled

a guest
Nov 21st, 2014
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <locale.h>
  3. #include <cmath>
  4. #include <string.h>
  5. #include <iostream>
  6. using namespace std;
  7. int main()
  8. {
  9. int n;
  10. cin>>n;
  11. int n1=n;
  12. n++;
  13. while(true)
  14. {
  15. int k=n;
  16. while(k)
  17. {
  18. if(k%10==8 || k%10==-8) return cout<<n-n1,0; k/=10;
  19. }
  20. n++;
  21. }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement