|
|
вернуться в форумWhy does my program isn't working. Послано Ilian 4 авг 2013 17:23 #include<iostream> #include<stdio.h> #include<stack> #include<cmath> using namespace std; int main () { stack <unsigned long long int> a; unsigned long long int num; while (scanf("%llu",&num)!=EOF) { a.push(num); } for (;;) { printf("%.4lf\n",double(sqrt(double(a.top())))); a.pop(); if (a.empty()==1) break; } return 0; } That's my code. I have WA1. But my program writes right answer for the sample test. Where is my mistake is it printf (i tried with cout but the result was the same.)? Edited by author 04.08.2013 17:29 |
|
|