Advertisement
Guest User

Untitled

a guest
Oct 21st, 2014
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. #include <stdio.h>
  2. int main () {
  3. int broj,z,x,broj1,broj2,broj3,brojac=0;
  4. scanf("%d",&broj);
  5. broj1=broj/1000000;
  6. printf ("0%d/",broj1);
  7. z=broj;
  8. broj/=1000;
  9. broj2=broj%1000;
  10. x=broj2;
  11. while (x>0){
  12. x/=10;
  13. brojac++;}
  14. if (brojac==3)
  15. printf("%d-",broj2);
  16. if (brojac==2) printf("0%d-",broj2);
  17. if (brojac==1) printf ("00%d-",broj2);
  18. broj3=z%1000;
  19. x=broj3;
  20. brojac=0;
  21. while (x>0){
  22. x/=10;
  23. brojac++;}
  24. if (brojac==3)
  25. printf("%d",broj3);
  26. if (brojac==2) printf("0%d",broj3);
  27. if (brojac==1) printf ("00%d",broj3);
  28. if (broj1==75 || broj1==76) printf(" ONE");
  29. if (broj1==70 || broj1==71 || broj1==72) printf(" T-mobile");
  30. if (broj1==77 || broj1==78) printf(" VIP");
  31.  
  32.  
  33. return 0;
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement