1.
#include<stdio.h>
2.
#include<conio.h>
3.
void main()
4.
{
5.
int
s=0,n,d,c,t;
6.
clrscr();
7.
printf("\n\tEnter Any Number ");
8.
scanf("%d",&n);
9.
printf("\n\tInput Number = %d",n);
10.t=n;
11.while(n!=0)
12.{
13.d=n%10;
14.c=d*d*d;
15.s=s+c;
16.n=n/10;
17.}
18.printf("\n\tCube Sum of each
Digit Number = %d",s);
19.if(t==s)
20.{
21.printf("\n\tArmstrong Number");
22.}
23.else
24.{
25.printf("\n\tNot Armstrong Number");
26.}
27.getch();
28.}
|
| Output
|
Computer Science :: 11th/12th, Computer Engineering :: Degree/Diploma, Coding Concept ( C, C++ & JAVA Programming, JDBC Concept, DBMS - SQL Concept, Data Structure, Communication & Network Concept.
ARMSTRONG NUMBER OR NOT
Subscribe to:
Posts (Atom)
Programmingway@Eklavya Technosys!: JTET 2026 | Computer Sections Solutions | Paper -II
Programmingway@Eklavya Technosys!: JTET 2026 | Computer Sections Solutions | Paper -II : 1) Which of the following is the extension of Not...
-
COMPUTER TERMINOLOGY 1) TCP/IP - Transmission Control Protocol/ Internet Protocol. 2) HTTP...
-
Programmingway@Eklavya Technosys!: PHP Exercise Solutions : PHP Exercise Solutions 1) Fill in the blanks a) The extension of a PHP cod...
-
https://makecode.com/_3VxaMo6c3YPp Code 1) What is Make Code Arcade? Answer: Make Code Arcade is a Block based coding. 2) Writ...
-
Check whether the number is negative or positive after taking a number as input from the user. TextWindow . WriteLine ( "Ente...
-
Programmingway@Eklavya Technosys!: Internet Security : ₪ Internet security Internet security protects your devices, networks, and persona...

No comments:
Post a Comment