Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <string.h>
- int Izbaci (int n) {
- if (n<0) return 0;
- int cifra,k=1,nb=0;
- while (n!=0) {
- cifra=n%10;
- if (cifra%3!=0) { nb+=cifra*k;
- k*=10; }
- n/=10;
- }
- return nb;
- }
- int main () {
- printf("%d",Izbaci(13579));
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement