#include <stdio.h>
int main(void) {
int x[10] = {0}; // 配列を定義し、初期値をすべて0に設定
// 配列の最初の要素と最後の要素の値を入力
printf("配列の最初の要素の値を入力してください: "); scanf("%d", &x
[0]); // 最初の要素を入力
printf("配列の最後の要素の値を入力してください: "); scanf("%d", &x
[9]); // 最後の要素を入力
// 配列の内容を表示
for (int i = 0; i < 10; i++) {
printf("x[%d] = %d\n", i
, x
[i
]); }
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CgppbnQgbWFpbih2b2lkKSB7CiAgICBpbnQgeFsxMF0gPSB7MH07ICAvLyDphY3liJfjgpLlrprnvqnjgZfjgIHliJ3mnJ/lgKTjgpLjgZnjgbnjgaYw44Gr6Kit5a6aCgogICAgLy8g6YWN5YiX44Gu5pyA5Yid44Gu6KaB57Sg44Go5pyA5b6M44Gu6KaB57Sg44Gu5YCk44KS5YWl5YqbCiAgICBwcmludGYoIumFjeWIl+OBruacgOWIneOBruimgee0oOOBruWApOOCkuWFpeWKm+OBl+OBpuOBj+OBoOOBleOBhDogIik7CiAgICBzY2FuZigiJWQiLCAmeFswXSk7ICAvLyDmnIDliJ3jga7opoHntKDjgpLlhaXlipsKCiAgICBwcmludGYoIumFjeWIl+OBruacgOW+jOOBruimgee0oOOBruWApOOCkuWFpeWKm+OBl+OBpuOBj+OBoOOBleOBhDogIik7CiAgICBzY2FuZigiJWQiLCAmeFs5XSk7ICAvLyDmnIDlvozjga7opoHntKDjgpLlhaXlipsKCiAgICAvLyDphY3liJfjga7lhoXlrrnjgpLooajnpLoKICAgIGZvciAoaW50IGkgPSAwOyBpIDwgMTA7IGkrKykgewogICAgICAgIHByaW50ZigieFslZF0gPSAlZFxuIiwgaSwgeFtpXSk7CiAgICB9CgogICAgcmV0dXJuIDA7Cn0K