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