From bfaa44a399fb076dde2746a90de8b1211e22bb11 Mon Sep 17 00:00:00 2001 From: Bohdan Yanchyk Date: Fri, 13 Mar 2020 17:23:52 +0000 Subject: [PATCH] =?UTF-8?q?P=C5=99idat=20=E2=80=9Edu3=E2=80=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- du3 | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 du3 diff --git a/du3 b/du3 new file mode 100644 index 0000000..cf5a978 --- /dev/null +++ b/du3 @@ -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