Armstrong Number Program in C | C Language Tutorial

preview_player
Показать описание
Armstrong Number Program in C
C Language Tutorial Videos

? Visit Our Website for Classroom Training:
? For Online Training:
--------------------------

? About NareshIT:

"Naresh IT is having 14+ years of experience in software training industry and the best Software Training Institute for online training, classroom training, weekend training, corporate training of Hadoop, Salesforce, AWS, DevOps, Spark, Data Science, Python, Tableau, RPA ,Java, C#.NET, ASP.NET, Oracle, Testing Tools, Silver light, Linq, SQL Server, Selenium, Android, iPhone, C Language, C++, PHP and Digital Marketing in USA,Hyderabad, Chennai and Vijayawada,Bangalore India which provides online training across all the locations

--------------------------

? Our Online Training Features:
1.Training with Real-Time Experts
2.Industry Specific Scenario’s
3.Flexible Timings
4.Soft Copy of Material
5. Share Videos of each and every session.

--------------------------

+1404-232-9879 or India: +918179191999

** Check The Below Links**
? Follow us on Linkedin:
Рекомендации по теме
Комментарии
Автор

Greatest way of explaining, no hurry, completely in a calm way 🔥💯

sasidharreddychalla
Автор

Cleared explanation sir that I had never seen before and also I'm searching for youtube for the Armstrong program and I have never seen anyone who teaches like you. Thank you, sir, 😍 good job sir. Whatever it may be your explanation is simply superb

aparna
Автор

Sir I felt c very tough but now I'm feeling it Tq sir....

Deeraj_adiga
Автор

Armstrong no is not the cube of individual digits but sum of each digit raised to power the no. of digits in it.

utkarshraj
Автор

Thanks you Nivu heli kotta logic tumba easy untu

srishtisherugar
Автор

#include<stdio.h>
#include<conio.h>
void main()
{int num, l, cb, sum=0;
printf("enter a number");
scanf("%d", &num);
int copy=num;
while(num!=0)
{l=num%10;
cb=l*l*l;
sum=sum+cb;
num=num/10;}
if(sum==copy)
printf("it is an armstrong no");
else
printf("it is not an armstrong no");
getch();}

By this also we can find the armstrong no

AbdulAhad-kdnn
Автор

for any no of digits first find no of digits seperately and use power function as below:

#include <stdio.h>

int power(int, int);

int main()
{
int n, sum = 0, temp, remainder, digits = 0;

printf("Input an integer\n");
scanf("%d", &n);

temp = n;
// Count number of digits
while (temp != 0) {
digits++;
temp = temp/10;
}

temp = n;

while (temp != 0) {
remainder = temp%10;
sum = sum + power(remainder, digits);
temp = temp/10;
}

if (n == sum)
printf("%d is an Armstrong number.\n", n);
else
printf("%d isn't an Armstrong number.\n", n);

return 0;
}

int power(int n, int r) {
int c, p = 1;

for (c = 1; c <= r; c++)
p = p*n;

return p;
}

ajmalsuperdhubri
Автор

Kya baat hai sir itta badhiya smjhaya hai 🥰🥰❤️

shortsstatus
Автор

So easy logic, explained in the simplest way possible. This is the simplest Armstrong No program which I have ever seen. just Brilliant Sir, Hat's off to you.🙌🔥

tusharsinha
Автор

Dear sir, you are awesome, you must be teacher of every college

chitransh
Автор

Excellent idea sir, I was not getting idea only

Sachi_Ray
Автор

U areamazing sir making harder to simplest

durvayerunkar
Автор

hi sir
armstrong number is not cubes of individual digits of number
if you take 4 digit number we have to check sum of power four of individual digits
if you take 5 digit number we have to check sum of power five of individual digits.
here you are taking 3 digit number so we have to check sum of cubes of individual digits.
sorry if i am wrong.

sundeepsaradhi
Автор

Sir, , you explained only 3 digit armstrong Number....1634 is also a armstrong..plz explain this one also

muralasettysivasankar
Автор

Write a code fragment that tests the value of an integer num1.if the value is 10, square num1 and print. If it is 2 or 3, multiply num1 by 99 and print the result.implement your code using if statement

Explain this sir

karthikcherry
Автор

hi sir, please check the logic once, what if we give n digit number . then it should be for example. 1234, then armstrong number logic should be 1^4 + 2^4 + 3^4 + 4^4

purnachandu
Автор

thank u sir.your video is very helpfull for me

mdnaimurrahman
Автор

helped me in understanding the looping concept thanks a lot sir 👏👏

brahamjeet
Автор

thank u for the great explanation sir.🤝

sushmanune
Автор

nice one sir, your way of teaching is very good, best wishes 👍👍

SmartProgramming
welcome to shbcf.ru