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