Nested for loop inside a do while loop
#include <stdio.h> #include <conio.h> int main(void) { int i, j, k, m; do { printf("Enter a value: "); scanf("%d", &i); m = 0; for(j=0; j<i; j++) for(k=0; k<100; k++) m = k + m; } while(i>0); return 0; }