i tried compiling my source code in visual studio 2017 , it compiles without errors , but doesn't work
it is a program to print armstrong numbers below a certain limit , ie addition of cube of each digit in number must be equal to the number ie , 153 where 1*1*1 + 5*5*5+3*3*3 = 153 here is my source code i tried compiling #include "stdafx.h" #include <stdio.h> #include <stdlib.h> #define _CRT_SECURE_NO_WARNINGS int i, a, b, c; char d[12]; char e[12]; int main(int argc, char const *argv[]) { for (i = 0; i < 1000; i++) { if (i<9) { printf("\n"); } if (i > 10 && i >= 99) { _itoa_s(i, d, 12); // sprintf (i,"%d",d); b = d[0] * d[0] * d[0] + d[1] * d[1] * d[1]; if (b == i) { printf("%d", i); } } if (i>99 && i<999) { _itoa_s(i, e, 12); //sprintf (i,"%d",d); b = d[0] * d[0] * d[0] + d[1] * d[1] * d[1] + d[2] * d[2] * d[2]; if (b == i) { printf("%d", i); } } if (i <= 999) { break; } } return 0; }