C++ Program .Write a program to input integer number & cheack number is armstrong or not.

#include<stdio.h>
#include<conio.h>
void main()
{
int num,rem,temp,sum=0;
clrscr();
printf("\n enter the number");
scanf("\n %d",&num);
temp=num;
while(num>0)
{
rem=num%10;
sum=sum+(rem*rem*rem);
num=num/10;
}
if(temp==num)
{
printf("\n number is armstrong");
}
else
{
printf("\n number is not armstrong");
}
getch();
}