|
|
вернуться в форумWhat is wrong ? (C++) // ConsoleApplication4.cpp : Defines the entry point for the console application. // #include <cstdlib> #include <iostream> #include <stdio.h> #include <math.h> #include <string.h> using namespace std; int main() { int count = 0; int maxCount = 0; long long MyArray[255]; for(int i=0; i<=255; i++){ MyArray[i] = -1; } while (scanf("%llu", &MyArray[count]) != EOF){ count++; maxCount = count; if (count > 255){ break; } } for (int i = maxCount-1; i >= 0; i--){ if(MyArray[i] != -1){ long double result = 0; result = sqrt((long double)(MyArray[i])); printf("%.4Lf\n", result); } } system("PAUSE"); return EXIT_SUCCESS; } Re: What is wrong ? (C++) Послано genock 7 май 2015 21:41 system("pause") must be deleted Re: What is wrong ? (C++) It does not work |
|
|