Mega Code Archive
Categories
/
C
/
Language Basics
Use char as int in a for loop
#include
int main(void) { int i; char j; i = 0; for(j = 1; j < 101; j++) i = j + i; printf("Total is: %d", i); return 0; }