SAD
This commit is contained in:
parent
40de55a10d
commit
ec2b15a217
BIN
du3/program
BIN
du3/program
Binary file not shown.
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user