From a09e2f68c5138fbfce717d5ca55539d6b6f536fa Mon Sep 17 00:00:00 2001 From: Bohdan Yanchyk Date: Fri, 13 Mar 2020 17:30:16 +0000 Subject: [PATCH] =?UTF-8?q?Nahr=C3=A1t=20soubory=20do=20=E2=80=9Ea1?= =?UTF-8?q?=E2=80=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- a1/program.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 a1/program.c diff --git a/a1/program.c b/a1/program.c new file mode 100644 index 0000000..057e65e --- /dev/null +++ b/a1/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