DSA
This commit is contained in:
parent
b9668e0125
commit
f7fd1370a1
BIN
du3/program
BIN
du3/program
Binary file not shown.
@ -3,23 +3,22 @@
|
||||
int main(){
|
||||
float vxod[999];
|
||||
int i = 0;
|
||||
int a = 1;
|
||||
float result = 0;
|
||||
while(1){
|
||||
float value = 0;
|
||||
float r = scanf("%f", &value);
|
||||
if(r == 1){
|
||||
if(r == 1)
|
||||
vxod[i++] = value;
|
||||
}else if(r == '\n'){
|
||||
printf("Vysledok je: %.2f\n", vxod[i]);
|
||||
}else if(r <= 255 && r >= 0){
|
||||
else if(r <= 255 && r >= 0){
|
||||
if(i != 0)
|
||||
printf("Nepodarilo sa nacitat polynom na %d mieste.\n", i);
|
||||
else
|
||||
printf("Nepodarilo sa nacitat zaklad x\n");
|
||||
break;
|
||||
}
|
||||
else{
|
||||
for(int a = 1; a < i; a++)
|
||||
}else{
|
||||
for(a = 1; a < i; a++)
|
||||
printf("%.2f\n", vxod[a]);
|
||||
result = vxod[0] * result + vxod[a];
|
||||
printf("Vysledok je: %.2f\n", result);
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user