Could anybody check this out?
it gives me a segmentation fault error when run
Code:#include <stdio.h> main() { int iBegNum = 0; int iEndNum = 0; int iIncre = 0; printf("\n\tCounting program"); printf("\nEnter the beginning number to start counting from: "); scanf("%d", iBegNum); printf("\nEnter the number to stop counting at: "); scanf("%d", iEndNum); printf("\nEnter the increment number: "); scanf("%d", iIncre); while ( iBegNum <= iEndNum) { printf("\nThe value is: %d", iBegNum); iBegNum = iBegNum + iIncre; } printf("\n\nThe program will now exit"); }