technicalsymposium

Google Search-Search in Our Website

Search Freshers Jobs/Conferences/Placement Materials/ All Engineering Branches Lecture Notes and
GATE/All Universities Question Papers in Our Website. Enter your Query & Search Below

Programming Codes with Answers

C Program For ARMSTRONG NUMBER.

#include<stdio.h>
#include<conio.h>
void main()
{
int n,t,s=0,k;
clrscr();
printf("Enter the n value:");
scanf("%d",&k);
n=k;
while(n>0)
{
t=n%10;
s=s+t*t*t;
n=n/10;
}
if(k==s)
{
printf("given %d is armstrong number",k);
}
else
{
printf("not armstrong number");
}
getch();
}

Hosting by Yahoo!

About-Us    Contact-Us    Site-map

©copyright 2009 All rights are reserved to technicalsymposium.com