for statement for (start expression; test expression; update expression) { loop body } printf(“i i * i\n”); for (i = 0; i < 5; i++) { iSquare = i * i; printf(“%d %d\n”, i, iSquare); } output: i i * i 0 0 1 1 2 4 3 9 4 16 Note: i++ is same as i = i + 1 Table of celsius and fahrenheit temperatures: 0 degrees celsius, is 32 degrees fahrenheit 100 degrees celsius is 212 degrees fahrenheit in general: fahrenheit = 1.8 * celsius + 32 int main(void) { int min, max, step; /* range (min .. max and step) */ int celsius; double fahrenheit; printf(“Enter min temp C: ”); scanf(“%d”, min); printf(“Enter max temp C: ”); scanf(“%d”, max); printf(“Enter step temp C: “); scanf(“%d”, step); printf(“celsius fahrenheit\n”); for (celsius = min; celsius <= max; celsius += step) { fahrenheit = 1.8 * celsius + 32; printf(“%3d %6.1f\n”, celsius, fahrenheit); } return 0; } Note: celsius += step means celsius = celsius + step Sample output (min = 10, max = 20 ,step = 5) celsius fahrenheit 10 50.0 15 59.0 20 68.0 other for statements: for (celsius = 30; celsius >= 0; celsius -= 3) { … } values of celsius: 30, 27, 24, 21, … for (oddNum = 1; oddNum <= 50, oddNum += 2) { … } values of oddNum: 1, 3, 5, 7, … 49 for (celsius = 30; celsius <= 50; celsius -= 2) { … } loop body does not execute. Can’t ever reach 50 if value of celsius is decreased.