#include <stdio.h>
#define DATAMAX 10
int main(void) {
int n; /* 入力されたデータの数 */
int number; /* 入力されたデータ */
int data[DATAMAX];/* 入力されたデータを格納する配列 */
int *pd = data;
int i;
printf("好きな正の整数をいくつか入力してください。\n "); printf("終了するときはゼロを入力してください\n "); n=0;
while (number!=0) {
if (number == 0) {
break;
}
if(n<DATAMAX) {
*(pd+n)=number;
n++;
}
else {
printf("データ数の上限 %d を越えました。\n", DATAMAX
); break;
}
}
for (i = n - 1; i >= 0; i--) {
}
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNkZWZpbmUgREFUQU1BWCAxMAoKaW50IG1haW4odm9pZCkgewoJaW50IG47ICAgICAgLyog5YWl5Yqb44GV44KM44Gf44OH44O844K/44Gu5pWwICovCglpbnQgbnVtYmVyOyAvKiDlhaXlipvjgZXjgozjgZ/jg4fjg7zjgr8gKi8KCWludCBkYXRhW0RBVEFNQVhdOy8qIOWFpeWKm+OBleOCjOOBn+ODh+ODvOOCv+OCkuagvOe0jeOBmeOCi+mFjeWIlyAqLwoJaW50ICpwZCA9IGRhdGE7ICAgIAoJaW50IGk7CgkKCXByaW50Zigi5aW944GN44Gq5q2j44Gu5pW05pWw44KS44GE44GP44Gk44GL5YWl5Yqb44GX44Gm44GP44Gg44GV44GE44CCXG4gIik7CglwcmludGYoIue1guS6huOBmeOCi+OBqOOBjeOBr+OCvOODreOCkuWFpeWKm+OBl+OBpuOBj+OBoOOBleOBhFxuICIpOwoJbj0wOwoJd2hpbGUgKG51bWJlciE9MCkgewogICAgICAgIHNjYW5mKCIlZCIsICZudW1iZXIpOwogICAgICAgIGlmIChudW1iZXIgPT0gMCkgewogICAgICAgIAlicmVhazsKICAgICAgICB9CiAgICAgICAgaWYobjxEQVRBTUFYKSB7CiAgICAgICAgCSoocGQrbik9bnVtYmVyOwogICAgICAgIAluKys7CiAgICAgICAgfQogICAgICAgIGVsc2UgewogICAgICAgIAlwcmludGYoIuODh+ODvOOCv+aVsOOBruS4iumZkCAlZCDjgpLotorjgYjjgb7jgZfjgZ/jgIJcbiIsIERBVEFNQVgpOwogICAgICAgICAgICBicmVhazsgCiAgICAgICAgfQoJfQoJIGZvciAoaSA9IG4gLSAxOyBpID49IDA7IGktLSkgewogICAgICAgIHByaW50ZigiJWQgIiwgKihwZCArIGkpKTsKCSB9CglwcmludGYoIlxuIOe1guS6huOBl+OBvuOBmeOAglxuIik7CglyZXR1cm4gMDsKfQ==