1for (let exercise = 1; exercise <= 3; exercise++) {
2 console.log(`---------- Starting exercise ${exercise}`)
3
4 for (let rep = 1; rep <= 6; rep++) {
5 console.log(`Exercise ${exercise}: Lifting weight repetitition ${rep}`);
6 }
7}
1#include<stdio.h>
2
3int main()
4{
5 int sum = 0, i, j;
6
7 for(i = 0; i < 3; i++)
8 {
9 sum += i;
10 for(j = 0; j < 3; j++)
11 {
12 sum += j;
13 if(((i + j) % 2) == 1)
14 break;
15 }
16 }
17
18 printf("%d",sum);
19
20 return 0;
21}
22
1int inner;
2 string result = " ";
3 for (int outer = 0; outer < 3; outer++)
4 {
5 for (inner = 10; inner > 5; inner--)
6 {
7 result += string.Format("Outer: {0} \tInner: {1} \n\n", outer,
8 inner);
9 }
10 } MessageBox.Show(result);
11 }