// This compiled under Microsoft C but is generic and // should be OK with any compiler #include "stdafx.h" #include
void main() { int index; int answer; answer=0; for (index=0;index<5;) { index += 1; answer+= index; } printf("The answer is %d",answer); index = getch(); }