Aktualizovat du2/program.c
This commit is contained in:
parent
6ab181825f
commit
a07ca847af
@ -1,5 +1,5 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#include <string.>
|
||||
|
||||
int main(){
|
||||
double koef=0;
|
||||
@ -10,8 +10,11 @@ int main(){
|
||||
printf("Nepodarilo sa nacitat zaklad x\n");
|
||||
return 0;
|
||||
}else{ while (scanf("%lf", &koef) == 1) {
|
||||
if(strlen(koef) !='\0'){
|
||||
rishennia=rishennia*a +koef;
|
||||
i++;
|
||||
}else{ printf("Vysledok je: %.2f\n", rishennia);
|
||||
return 0; }
|
||||
}
|
||||
if (feof(stdin)) {
|
||||
printf("Vysledok je: %.2f\n", rishennia);
|
||||
|
Loading…
Reference in New Issue
Block a user