From d44c09e868c52f1c7b388cf2d25ea0ce2df4777f Mon Sep 17 00:00:00 2001 From: Bohdan Yanchyk Date: Fri, 13 Mar 2020 17:28:46 +0000 Subject: [PATCH] =?UTF-8?q?Nahr=C3=A1t=20soubory=20do=20=E2=80=9Edu3?= =?UTF-8?q?=E2=80=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- du3/program.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 du3/program.c diff --git a/du3/program.c b/du3/program.c new file mode 100644 index 0000000..057e65e --- /dev/null +++ b/du3/program.c @@ -0,0 +1,30 @@ +#include +#include +#include +int main() +{ + float x=0; + float value =0; + int count =0; + float arr[50]; + while(scanf("%f",&value)!=EOF){ + if(isalpha(value)!=0){ + return 0; + } + if(count !=0){ + arr[count-1]=value; + } + else{ + x=value; + } + count++; + } + value=0; + for(int i =0;i