C Code Samples
Convert Upto 3 Digit Numbers to Equivalent Word Format (C-Code)
Works only upto 3 digit number [crayon-5a2bba9f140ed706526702/]
Works only upto 3 digit number [crayon-5a2bba9f140ed706526702/]
What is a nasty number? Well it is a number whose four different factors can be arranged in such a way that sum of two is equal to difference of other two. Take an example of nasty number 36. It have factors 1,2,3,4,6,9,12,18. So, we have 2+1=6-3 . So, it Read more…
Note : Just for Knowledge and avoid using it. [crayon-5a2bba9f148e9703774715/]
Note: Should not be used to for sorting large data. #include < stdio.h > #include < conio.h > #define size 20 // size of array void main() { int i, j, temp, elements[size], n; clrscr(); printf("Enter the number of elements\t"); // Enter the number of total elements Read more…
Which are armstrong numbers? Numbers whose sum of cube of digits is equal to the number itself. e.g. if we take 153 than 13 =1 53=125 33=27 and sum of all of them is 1+125+27=153 so 153 is a armstrong number. Code in c : #include < stdio.h > #include Read more…