#include<conio.h>
#include<stdio.h>
void main()
int no,n,cube=0,d;
clrscr();
printf("\nEnter the number\n");
scanf("%d",&n);
no=n
while(n>0)
{
d=n%10;
cube=cube+d*d*d;
n=n/10;
}
printf("\ncubic sum of %d is %d",no,cube);
getch();
}
AUTHOR DANISH BEIGH
email id:- beigh.danish@gmail.com
#include<stdio.h>
void main()
int no,n,cube=0,d;
clrscr();
printf("\nEnter the number\n");
scanf("%d",&n);
no=n
while(n>0)
{
d=n%10;
cube=cube+d*d*d;
n=n/10;
}
printf("\ncubic sum of %d is %d",no,cube);
getch();
}
AUTHOR DANISH BEIGH
email id:- beigh.danish@gmail.com
No comments:
Post a Comment
Tell Us What You've Got...