Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main (){
- int n, brcif=0, dn, dekadenbr=1, cifra, obratensum=0;
- scanf("%d", &n);
- if(n<=9){
- printf("Nevaliden");
- }
- else{
- dn=n;
- for(;dn;){
- dn/=10;
- brcif++;
- dekadenbr*=10;
- }
- printf("%d\n", brcif);
- printf("%d\n", dekadenbr);
- dn=n;
- for(;dn;){
- obratensum+=1000*cifra=dn%10;
- dekadenbr/=10;
- dekadenbr 100;
- }
- if(obratensum%brcif==0){
- printf("Interesno");
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement