Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
For Loop Practice | Control Statements
C Basics
course content

Зміст курсу

C Basics

C Basics

1. Introduction
2. Data
3. Operators
4. Control Statements
5. Functions
6. Pointers

For Loop Practice

Example from the Previous Lesson

c

main

copy
1234567891011121314
#include <stdio.h> int main() { int array[] = { 3, 6, 2, 134, 45, 2, 564, 8, 3, 531 }; for (int i = 0; i < 10; i++) { printf("Index of element: %d\tValue of element: %d\n", i, array[i]); } return 0; }

Завдання

Use the for loop to display numbers from 10 down to 0 on the screen.

Завдання

Use the for loop to display numbers from 10 down to 0 on the screen.

Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів

Все було зрозуміло?

Секція 4. Розділ 7
toggle bottom row

For Loop Practice

Example from the Previous Lesson

c

main

copy
1234567891011121314
#include <stdio.h> int main() { int array[] = { 3, 6, 2, 134, 45, 2, 564, 8, 3, 531 }; for (int i = 0; i < 10; i++) { printf("Index of element: %d\tValue of element: %d\n", i, array[i]); } return 0; }

Завдання

Use the for loop to display numbers from 10 down to 0 on the screen.

Завдання

Use the for loop to display numbers from 10 down to 0 on the screen.

Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів

Все було зрозуміло?

Секція 4. Розділ 7
toggle bottom row

For Loop Practice

Example from the Previous Lesson

c

main

copy
1234567891011121314
#include <stdio.h> int main() { int array[] = { 3, 6, 2, 134, 45, 2, 564, 8, 3, 531 }; for (int i = 0; i < 10; i++) { printf("Index of element: %d\tValue of element: %d\n", i, array[i]); } return 0; }

Завдання

Use the for loop to display numbers from 10 down to 0 on the screen.

Завдання

Use the for loop to display numbers from 10 down to 0 on the screen.

Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів

Все було зрозуміло?

Example from the Previous Lesson

c

main

copy
1234567891011121314
#include <stdio.h> int main() { int array[] = { 3, 6, 2, 134, 45, 2, 564, 8, 3, 531 }; for (int i = 0; i < 10; i++) { printf("Index of element: %d\tValue of element: %d\n", i, array[i]); } return 0; }

Завдання

Use the for loop to display numbers from 10 down to 0 on the screen.

Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів
Секція 4. Розділ 7
Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів
We're sorry to hear that something went wrong. What happened?
some-alt