|
|
вернуться в форумfor help wrong answer #include <stdio.h> #include<cmath> #include<iostream> void main() { double a[100000]; int i=0,count=0; while(std::cin>>a[i]) { if ((a[i]>0||a[i]==0)&&(a[i]==pow(float(10),18)||a[i]<pow(float(10),18))) { printf("if you want to end press a char!\n"); a[i]=sqrt((double)a[i]); count++; i++; } else break; } getchar();
for (int i=count-1;i>0||i==0;i--) printf("%.4lf\n",a[i]);
} |
|
|