answersLogoWhite

0


Best Answer

//by rsravan12

#include<stdio.h>

#include<conio.h>

void main()

{

long int num,sum,k,temp ;

clrscr();

printf("\nenter num= ");

scanf("%d",&num);

sum=0;num=temp;

while(temp>0)

{

temp=temp%10;

sum=sum+k*k*k;

temp=temp/10;

}

if(num==sum)

{

printf("\n%d is armstrong",num);

}

else

{

printf("\n%d is not a armstrong",num);

}

getch();

}

//hyderabad

User Avatar

Wiki User

12y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: C program to find the given no is Armstrong or not using for loop?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How to write a C program to find largest 2 numbers using pointers?

program to find maximum of two numbers using pointers


Write a c program to find GCD of two given integers by using both recursive n non recursive functions?

i love u darling


Where can I find somebody to train me to military Fitness?

You can be trained to military Fitness standards using a Fitness program such as P90X or Insanity which have given workouts that military personnel do as well.


Do an 8086 assembler program to find parity of a given number?

sdfsdfsfsggbcvbg


To find Armstrong number in java?

/*Program to find whether given no. is Armstrong or not. Example : Input - 153 Output - 1^3 + 5^3 + 3^3 = 153, so it is Armstrong no. */ class Armstrong{ public static void main(String args[]){ int num = Integer.parseInt(args[0]); int n = num; //use to check at last time int check=0,remainder; while(num &gt; 0){ remainder = num % 10; check = check + (int)Math.pow(remainder,3); num = num / 10; } if(check == n) System.out.println(n+" is an Armstrong Number"); else System.out.println(n+" is not a Armstrong Number"); } }


How do you write Square program using vb?

write a vb program to find the magic square


Shell program to find the smallest digit of a given number?

syntax error


Need a'c' program to find given number is even or odd?

No, thanks.


Write a program to find the grade obtained by the students of a class using structure?

Write a program to find the grade obtained by the students of a class


Do I need to write a program to find a substring in a given string in c plus plus?

No.


To find the bisector of a given angle using a paper folding construction does it requires you to first create a triangle using the given angle?

False!


How do you write an assembly language program to find the sum of n numbers using array?

write an assembly language program to find sum of N numbers