+ 1

Why this c prog. For Armstrong number check is behaving strangely?

plz follow the below link and check my program 1. run as it is nd check the o/p for I/p number 1634 2. remove the forward slashes (//) on line 31 and line 46 nd run again in the second case u get it correctly... but why is it happening? 31&46 are just print statements they don't effect the program.. plz explain if u found the answer.... thank you.... http://ideone.com/KzIXgE

26th May 2017, 2:16 AM
Basha Syed
Basha Syed - avatar
3 odpowiedzi
+ 5
in digits function u forget to initializ c int c=0 then we will get no error at 31 and 46 lines http://ideone.com/lpMNpe
26th May 2017, 8:13 AM
Rajyalakshmi Reddy
Rajyalakshmi Reddy - avatar
+ 4
welcome dude ­čśŐ
26th May 2017, 8:47 AM
Rajyalakshmi Reddy
Rajyalakshmi Reddy - avatar
0
thnx @rajyalakshmi.M for Ur effort
26th May 2017, 8:46 AM
Basha Syed
Basha Syed - avatar