C examples for Statement:for
Leave one or more expressions blank but don't omit the semicolons in for loop
#include <stdio.h> int main(void) { int ans, n;//from w ww .j ava 2s . c o m ans = 2; for (n = 3; ans <= 25; ) ans = ans * n; printf("n = %d; ans = %d.\n", n, ans); return 0; }