Results 1 to 13 of 13
Thread: ++
Hybrid View
-
22nd June 2007 00:25 #1
++
, 3D . , Bloodshed Dev-C++. . , ax^2+-bx+-c=0. , . =9, b=-6, c=1, , 1/3 ( ), 27, . :
Code:#include<iostream> #include<cmath> using namespace std; #include<stdio.h> int main(void) { float A, B, C, D, X, X1, X2; cout << "Enter the A, B, C parameters of the quadratic equation\n"; cout << "A="; cin >> A; cout << "B="; cin >> B; cout << "C="; cin >> C; D=(B*B)-(4*A*C); cout << "The discriminant is " <<D <<"\n"; if(D>0) { X1=(-B+sqrt(D))/(2*A); X2=(-B-sqrt(D))/(2*A); cout << "X1=" << X1; cout << "\nX2=" << X2 <<"\n"; } if(D<0){cout << "The equation doesn't have real radicals.\n";} if(D==0) { X=(-B)/2*A; cout <<"X1=X2=" << X << "\n"; } system("pause"); return 0; }
-
22nd June 2007 01:03 #2
-
22nd June 2007 07:59 #3
, . , 27, 0.33333333 , float, . - , , .
Last edited by haibusa2005; 22nd June 2007 at 08:04.
-
22nd June 2007 09:04 #4
, #2,
Code:$ ./mtest Enter the A, B, C parameters of the quadratic equation A=9 B=-6 C=1 The discriminant is 0 X1=X2=0.333333
Internet - it doesn't make you stupid, it just makes your stupidity more accessible to others
-
22nd June 2007 16:39 #5
-
26th June 2007 18:19 #6
, :
#include<cmath>
#include<stdio.h>?
cmath, ...
math?
int main(void) ?
btw, ... , ++...
- - #include<iostream>
20 ++ (
)
-
26th June 2007 20:34 #7
cmath math.h, std. C (stdio.h, math.h ..) C++ "", c . / std, , .
main void , . main() - ( C void, ). int, g++ , .
stdio.h
Internet - it doesn't make you stupid, it just makes your stupidity more accessible to others
-
26th June 2007 21:34 #8
-
27th June 2007 12:05 #9
System ("Pause"); stdio.h (, - ++... )
sqrt ... ...
- , (, ... ), , 2 2 ...
..: , :
- ( ) cin, , ...
-
27th June 2007 13:06 #10
, system(3) stdlib.h. , cstdlib
Internet - it doesn't make you stupid, it just makes your stupidity more accessible to others
-
27th June 2007 13:11 #11
-
27th June 2007 13:31 #12
, 3 man - .
Internet - it doesn't make you stupid, it just makes your stupidity more accessible to others
-
27th June 2007 17:13 #13
, ...
...
.
Last edited by php_bg; 27th June 2007 at 17:26.




Reply With Quote

Lenovo ThinkPad 15 IdeaPad 15
5th May 2023, 22:16 in