IOM 2017, Блиц — Задача 9

OLYMPIAD OF METROPOLISES. Moscow, September 4 · 4 септември 2017 г.

Условие

Provide the output of the following program:

Program listing in C: include <stdio.h>; int main() declares int val[10] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0; int sum = 0; int i; a loop for( val[4] = 0; val[4] < 10; val[4]++) with body val[val[4]] = val[4] * 2; a loop for( i = 0; i < 10; i++) with body sum = sum + val[i]; then printf( %d, sum); and the closing brace.

Отговори

Решение


Оригинал в Архива: blitz.pdf · официални решения: answers-blitz.pdf