pvjc22/du3/program.c
Yaroslav Orlianskyi f477e7c79e ASD
2022-03-17 14:56:53 +01:00

22 lines
301 B
C

#include <stdio.h>
int main(){
int c,a = 0;
int s;
int result;
int vxod[99];
for(int i = 0; i < 10; i++){
c = fgets();
if(c != 1)
break;
vxod[i] = c;
a++;
}
s = vxod[0];
for(int i = 0; i < a; i++){
result = s * vxod[i] + i;
}
printf("Vysledok je: %d\n", result);
return 0;
}