-
Notifications
You must be signed in to change notification settings - Fork 49
/
amstrong.html
54 lines (51 loc) · 934 Bytes
/
amstrong.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<html>
<head>
<style>
body{
background-color: white;
}
h1{
color: #6F69AC;
text-align: center;
line-height: 0.3;
}
h5{
color: #FD6F96 ;
text-align: center;
}
p {
color: #716bad;
font-family: Arial ;
}
ol{
margin-left: 20px;
}
li{
color: #716bad;
font-family: Monospace;
}
</style>
</head>
<body>
<h1>Armstrong Number</h1>
<h5>By: Janus Jerom</h5>
<p>
Algorithm to check whether the given number iis armstrong or not
</p>
<ol>
<li>Start</li>
<li>Declare Variable sum, temp, num</li>
<li>Read num from User.</li>
<li>Initialize Variable sum=0 and temp=num.</li>
<li>Repeat Until num>=0</li>
<li>sum=sum + cube of last digit i.e [(num%10)*(num%10)*(num%10)]</li>
<li>num=num/10</li>
<li>IF sum==temp
Print "Armstrong Number"
ELSE
Print "Not Armstrong Number"</li>
<li>Stop</li>
</ol>
</body>
</html>
© 2021 GitHub, Inc.