1
00:00:05,000 --> 00:00:06,000
Good morning.

2
00:00:06,000 --> 00:00:17,000
Today I just tell you how to create Armstrong number or how to check a given number is Armstrong number

3
00:00:17,000 --> 00:00:18,000
or not.

4
00:00:18,000 --> 00:00:19,000
In view.

5
00:00:20,000 --> 00:00:26,000
So as you see over here, I just select a example.

6
00:00:26,000 --> 00:00:30,000
153 is in Armstrong number or not.

7
00:00:30,000 --> 00:00:40,000
So the basic logic behind the Armstrong number is that if you just separate all the digits at different

8
00:00:40,000 --> 00:00:53,000
places and you just cube it individually, and the sum of all these digits with cube is equal to the

9
00:00:53,000 --> 00:00:59,000
equivalent given number when the sum of the cube of the individual digits of a number is equal to the

10
00:00:59,000 --> 00:01:03,000
number, the number is called Armstrong number.

11
00:01:03,000 --> 00:01:04,000
Okay.

12
00:01:04,000 --> 00:01:09,000
So let's how to do it in LabVIEW.

13
00:01:09,000 --> 00:01:10,000
Let's check.

14
00:01:11,000 --> 00:01:17,000
So just go to my block diagram window over here.

15
00:01:17,000 --> 00:01:27,000
I just first insert a number and the number is my integer number, so I just make it side by side.

16
00:01:27,000 --> 00:01:30,000
So over here, this is my input number.

17
00:01:32,000 --> 00:01:43,000
This is my input number after this because this is my floating number.

18
00:01:43,000 --> 00:01:45,000
I just need to convert it to

19
00:01:48,000 --> 00:01:49,000
integer.

20
00:01:50,000 --> 00:01:53,000
So right now I just use it I32.

21
00:01:53,000 --> 00:01:55,000
So this is my input number.

22
00:01:55,000 --> 00:01:58,000
Just put 153 inside it.

23
00:02:00,000 --> 00:02:09,000
After this I need to convert these integer into separate numbers for that purpose.

24
00:02:09,000 --> 00:02:16,000
I just first convert it into string number to decimal string.

25
00:02:20,000 --> 00:02:26,000
Then over here I just create an indicator.

26
00:02:26,000 --> 00:02:34,000
So over here I got the decimal equivalent string of this given number.

27
00:02:34,000 --> 00:02:36,000
As you see over here.

28
00:02:36,000 --> 00:02:41,000
Now, I need to separate all these digits.

29
00:02:41,000 --> 00:02:42,000
153.

30
00:02:42,000 --> 00:02:49,000
Okay, so for that purpose, I just go to string string subset.

31
00:02:51,000 --> 00:02:52,000
Connect this one.

32
00:02:55,000 --> 00:02:57,000
You need to set the offset.

33
00:02:59,000 --> 00:03:01,000
You need to set the length.

34
00:03:05,000 --> 00:03:10,000
And over here I got the sub string create indicator.

35
00:03:11,000 --> 00:03:15,000
So this is the sub string first.

36
00:03:17,000 --> 00:03:18,000
Let's run it.

37
00:03:18,000 --> 00:03:23,000
One is separated from the given string like this.

38
00:03:23,000 --> 00:03:26,000
I just copy over here.

39
00:03:26,000 --> 00:03:27,000
This is my second.

40
00:03:28,000 --> 00:03:30,000
Just make input.

41
00:03:30,000 --> 00:03:34,000
String offset is my one.

42
00:03:34,000 --> 00:03:37,000
Now length is the same.

43
00:03:37,000 --> 00:03:38,000
Let's check again.

44
00:03:38,000 --> 00:03:39,000
Run it.

45
00:03:39,000 --> 00:03:47,000
As you see, five is separated from the given string like this.

46
00:03:47,000 --> 00:03:52,000
We just separate the third digit.

47
00:03:55,000 --> 00:03:57,000
Connect it over here.

48
00:03:57,000 --> 00:03:58,000
Offset is two.

49
00:04:02,000 --> 00:04:03,000
You can name it.

50
00:04:03,000 --> 00:04:06,000
Also this is the string

51
00:04:09,000 --> 00:04:09,000
equivalent

52
00:04:14,000 --> 00:04:15,000
over here.

53
00:04:16,000 --> 00:04:25,000
First digit, second digit, and this is my third digit.

54
00:04:27,000 --> 00:04:31,000
This program is for only three digits.

55
00:04:32,000 --> 00:04:32,000
Okay.

56
00:04:33,000 --> 00:04:37,000
So now I got all the three digits as you see.

57
00:04:39,000 --> 00:04:46,000
Now I just need to cube off, get the cube of all these numbers.

58
00:04:46,000 --> 00:04:52,000
So before this, I just need to convert this string into number again.

59
00:04:52,000 --> 00:04:58,000
I just go to conversion decimal string to number conversion.

60
00:04:58,000 --> 00:05:03,000
I just need just connect over here and over here.

61
00:05:03,000 --> 00:05:04,000
I got the number.

62
00:05:06,000 --> 00:05:07,000
Let's check.

63
00:05:08,000 --> 00:05:10,000
As you see, this is the number.

64
00:05:12,000 --> 00:05:24,000
I just delete this number indicator from here because I need to cube root.

65
00:05:24,000 --> 00:05:27,000
I get the cube root of all these.

66
00:05:27,000 --> 00:05:29,000
So you need to connect over here.

67
00:05:29,000 --> 00:05:33,000
This one Now for the cube root.

68
00:05:33,000 --> 00:05:38,000
I just go to the compound function over here.

69
00:05:38,000 --> 00:05:41,000
Just change the mode to the multiply.

70
00:05:42,000 --> 00:05:44,000
Connect this to number.

71
00:05:46,000 --> 00:05:48,000
Now I got the cube root.

72
00:05:48,000 --> 00:05:52,000
You can check also create indicator over here.

73
00:05:52,000 --> 00:05:54,000
One cube root is equivalent to one.

74
00:05:56,000 --> 00:05:59,000
As you see, this is the result.

75
00:05:59,000 --> 00:06:11,000
Same way I just connect all the three digits remaining.

76
00:06:11,000 --> 00:06:12,000
Two digits

77
00:06:14,000 --> 00:06:18,000
indicator over here again.

78
00:06:18,000 --> 00:06:21,000
Indicator three is there.

79
00:06:21,000 --> 00:06:23,000
Just need to connect over here.

80
00:06:23,000 --> 00:06:26,000
Now let's run it.

81
00:06:27,000 --> 00:06:28,000
This is my two.

82
00:06:29,000 --> 00:06:31,000
This is my three indicator.

83
00:06:33,000 --> 00:06:33,000
Run it.

84
00:06:33,000 --> 00:06:42,000
As you see, one cube root is one five cube root is 125 three cube root is not cube root cube three

85
00:06:42,000 --> 00:06:44,000
cube is 27.

86
00:06:44,000 --> 00:06:45,000
Okay.

87
00:06:45,000 --> 00:06:49,000
So now I just need to add all these numbers,

88
00:06:53,000 --> 00:06:55,000
all these given numbers.

89
00:07:00,000 --> 00:07:03,000
And over here, I got the result.

90
00:07:06,000 --> 00:07:10,000
Let's check what happened inside this planet.

91
00:07:10,000 --> 00:07:13,000
I got 153, as you see.

92
00:07:15,000 --> 00:07:24,000
And I just put an indicator also, which will display the given number is Armstrong number or not.

93
00:07:27,000 --> 00:07:32,000
So if it is true, it is my Armstrong number.

94
00:07:32,000 --> 00:07:35,000
Otherwise it is not.

95
00:07:37,000 --> 00:07:39,000
Name it Armstrong number.

96
00:07:42,000 --> 00:07:47,000
So for that purpose, I just put a logic.

97
00:07:50,000 --> 00:08:00,000
When the input number is equivalent to the given number.

98
00:08:00,000 --> 00:08:04,000
In that case, it is a Armstrong number, let's say.

99
00:08:04,000 --> 00:08:07,000
As you see, the given number is Armstrong number.

100
00:08:07,000 --> 00:08:09,000
So this is the code right now.

101
00:08:09,000 --> 00:08:12,000
The these indicators are not required.

102
00:08:12,000 --> 00:08:19,000
You just delete also all these indicators in between.

103
00:08:20,000 --> 00:08:23,000
Let's delete these indicators.

104
00:08:24,000 --> 00:08:27,000
Delete this one indicator also.

105
00:08:29,000 --> 00:08:35,000
So I need this one, the input number and the result and the output.

106
00:08:37,000 --> 00:08:42,000
If both are same, the given number is my Armstrong number.

107
00:08:42,000 --> 00:08:49,000
So this is how you can go with or how to check the given number is Armstrong number or not.

108
00:08:49,000 --> 00:08:52,000
Let's do it for another number.

109
00:08:56,000 --> 00:08:56,000
Right now.

110
00:08:56,000 --> 00:08:58,000
I just put 144

111
00:09:00,000 --> 00:09:01,000
before this.

112
00:09:01,000 --> 00:09:09,000
I need to clear all the broken wires as you see over here, Ctrl B, so run it.

113
00:09:10,000 --> 00:09:15,000
So given number is not Armstrong number, let's check for another one.

114
00:09:15,000 --> 00:09:20,000
135 Again, the given number is not Armstrong number,

115
00:09:24,000 --> 00:09:34,000
so I just go with 153 Let's so given number is Armstrong number, let's check for 111.

116
00:09:36,000 --> 00:09:39,000
Again, it is not a Armstrong number.

117
00:09:39,000 --> 00:09:44,000
So this is how you can check the given number is Armstrong number or not in LabVIEW.

118
00:09:44,000 --> 00:09:47,000
So this is all about today's lecture.

119
00:09:48,000 --> 00:09:49,000
Thank you.

120
00:09:49,000 --> 00:09:49,000
Over here.

121
00:09:49,000 --> 00:09:55,000
This is the code you can try on your own.

122
00:09:55,000 --> 00:09:58,000
I just make the labels visible.

123
00:10:01,000 --> 00:10:07,000
Visible item label control you to minimize the structure.

124
00:10:08,000 --> 00:10:10,000
Okay, so this is the code.

125
00:10:14,000 --> 00:10:15,000
Thank you.

