อาร์มสตรองความหมายความหมายใน c

รหัสตัวอย่าง

1
0

N

#include<stdio.h>
#include<conio.h>
void arm(int a);
int main()
{
	int a;
	printf("\t\t\tEnter a number\n\t\t\t ");
	scanf("%d",&a);
	arm (a);
	getch();
	return 0;
}
void arm(int a)
{
	int b,sum,remainder;
	b=a;
	while (a>0)
	{
		remainder=a%10;
		sum=sum+(remainder*remainder*remainder);
		a=(a-remainder)/10;
	}
	if (b==sum)
	{
		printf("\t\nIt is armstrong number\n");
	}
	else
	{
		printf("\n\tIt is not armstrong number\n");
	}
}

ในภาษาอื่นๆ

หน้านี้อยู่ในภาษาอื่นๆ

Русский
..................................................................................................................
English
..................................................................................................................
Italiano
..................................................................................................................
Polski
..................................................................................................................
Română
..................................................................................................................
한국어
..................................................................................................................
हिन्दी
..................................................................................................................
Français
..................................................................................................................
Türk
..................................................................................................................
Česk
..................................................................................................................
Português
..................................................................................................................
中文
..................................................................................................................
Español
..................................................................................................................
Slovenský
..................................................................................................................
Балгарскі
..................................................................................................................
Íslensk
..................................................................................................................

ดังอยู่ในนี้หมวดหมู่

ดังหน้ากับตัวอย่างอยู่ในหมวดหมู่