This commit is contained in:
Yaroslav Orlianskyi 2022-03-17 16:35:56 +01:00
parent 40de55a10d
commit ec2b15a217
2 changed files with 12 additions and 17 deletions

Binary file not shown.

View File

@ -1,25 +1,20 @@
#include <stdio.h>
int main(){
int c;
int c, result;
int value = 0;
int vxod[999];
for(int i = 0; i < 2; i++){
scanf("%d", &c);
if(c == 4)
break;
int a = 0;
for(int i = 0; i < 4; i++){
c = scanf("%d",&value);;
vxod[i] = c;
a = i;
}
if(c == 4)
printf("Vysledok je: 57.00\n");
else if(vxod[0] == 2 && vxod[1] == 1)
printf("Vysledok je: 3.00\n");
else if(vxod[0] == 2 && vxod[1] == 2)
printf("Vysledok je: 6.00\n");
else if(vxod[0] == 12)
printf("Vysledok je: 1719.00\n");
else if(vxod[0] == 7)
printf("Vysledok je: 1893.00\n");
else if(vxod[0] == 1)
printf("Vysledok je: 9.00\n");
value = 0;
do{
result = vxod[0] * vxod[value] + 1;
value++;
}while(value < a);
printf("%d\n", result);
return 0;
}