Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <string.h>
- #include<stdlib.h>
- #include <math.h>
- int main() /* Arf!!! Welcome to my Nomstrong number divider */
- {
- int Noms;
- Noms=0;
- char Arf[100];
- int CD;
- int CDx;
- int Output=0;
- int Storage;
- puts("Give me a number! :3");
- scanf("%s",Arf);
- CD=strlen(Arf);
- CDx=CD;
- Noms=atoi(Arf);
- int Original=Noms;
- while(CD>0){
- Storage=Noms;
- Noms=Noms % 10;
- Output=Output+pow(Noms,CDx);
- printf("%d\n%d\n",Output,CDx);
- Storage=Storage/10;
- Noms=Storage;
- CD--;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement