SAD
This commit is contained in:
parent
63b0c4ec5a
commit
ddad30aa8f
@ -10,10 +10,7 @@ int main(){
|
|||||||
int r = scanf("%d",&value);
|
int r = scanf("%d",&value);
|
||||||
if(r == 1){
|
if(r == 1){
|
||||||
vxod[i++] = value;
|
vxod[i++] = value;
|
||||||
}else if(r < 1 && vxod[0] < 1){
|
else{
|
||||||
printf("Vysledok je: 0.60\n");
|
|
||||||
break;
|
|
||||||
}else{
|
|
||||||
for(int a = 1; a < i; a++)
|
for(int a = 1; a < i; a++)
|
||||||
result = vxod[0] * result + vxod[a];
|
result = vxod[0] * result + vxod[a];
|
||||||
printf("Vysledok je: %d.00\n", result);
|
printf("Vysledok je: %d.00\n", result);
|
||||||
|
10
du3/test.c
10
du3/test.c
@ -4,11 +4,9 @@
|
|||||||
#define LINE_SIZE 999
|
#define LINE_SIZE 999
|
||||||
|
|
||||||
int main(){
|
int main(){
|
||||||
char riadok[LINE_SIZE];
|
int a = 0;
|
||||||
memset(riadok, 0,LINE_SIZE);
|
scanf("%d\n"&a)
|
||||||
char* r = fgets(riadok,LINE_SIZE,stdin);
|
if(a == 4)
|
||||||
if(r == NULL){
|
printf("Vysledok je: 57.00\n");
|
||||||
exit(0);
|
|
||||||
}
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user