C examples for Statement:for
Using a for loop to make a table of cubes
#include <stdio.h> int main(void) { int num;// w w w . j av a 2 s. c om printf(" n n cubed\n"); for (num = 1; num <= 6; num++) printf("%5d %5d\n", num, num*num*num); return 0; }