Results 1 to 7 of 7
Thread: ?
Hybrid View
-
17th December 2009 17:12 #1
?
, , ,
. , .
:
, :1- ; 2- ; 3- . .
!Code:#include <iostream> #include <cmath> // #include <fstream> using namespace std; void strani3() // 3 . { int a,b,c; // double s,p; cout<<"vyvedete a"<<endl; // cin>>a; // cout<<"vyvedete b"<<endl; // cin>>b; // cout<<"vyvedete c"<<endl; // cin>>c; // if(a+b<c) // if-else . { cout<<"nqma takyv triygylnik"<<endl; } if(a+c<b) { cout<<"nqma takyv triygylnik"<<endl; } if(c+b<a) { cout<<"nqma takyv triygylnik"<<endl; } else { p=0.5*(a+b+c); s=sqrt(p*((p-a)*(p-b)*(p-c))); // } cout<<"liceto na triygylnika e "<<s<<endl; // ofstream myFile("kursova_zadacha.txt"); // if(! myFile) // { cout<<"failyt nemoje da byde syzdaden"; } else myFile<<"\nRezultata e \t"<<s<<endl; // myFile.close(); } void strani2i1ygyl() // 2 . { int a,b; // double s; // double c; // cout<<"vyvedete ednata strana"<<endl; // cin>>a;// cout<<"vyvedete drugata strana"<<endl;// cin>>b;// cout<<"vyvedete ygylyt mejdu tqh"<<endl;// cin>>c;// if(c>=180) // . { cout<<"nqma takyv triygylnik"; } else { c=(sin((c*3.1415)/180)); // s=(0.5*(a*b)*c); // } cout<<"liceto na triygylnika e "<<s<<endl; // ofstream myFile("kursova_zadacha.txt"); // if(! myFile) // { cout<<"failyt nemoje da byde syzdaden"; } else myFile<<"\nRezultata e \t"<<s<<endl;// myFile.close(); } void ygyl2i1strana() // { int c; // float s,a,b; cout<<"vyvedete ediniqt prilejasht ygyl v gradusi"<<endl; // cin>>a; // cout<<"vyvedete drugiqt prilejashtygyl v gradusi"<<endl;// cin>>b;// cout<<"vyvedete stranata"<<endl;// cin>>c;// a=(sin((a*3.1415)/180)); // b=(sin((b*3.1415)/180)); // s=(0.5*(c*c)*a*b)/(a+b); // cout<<"liceto na triygylnika e "<<s<<endl; ofstream myFile("kursova_zadacha.txt"); // if(! myFile) // { cout<<"failyt nemoje da byde syzdaden"; } else myFile<<"\nRezultata e \t"<<s<<endl; // myFile.close(); } void main() // { char n; cout<<"\t\tIZBERETE NQKOQ OT FUNKCIITE"<<endl; // cout<<"\t1.Namirane na lice po tri strani"<<endl; cout<<"\t2.Namirane na lice po dve strani i ygyl mejdu tqh"<<endl; cout<<"\t3.Namirane na lice po strana i dva prilejashti ygyla"<<endl; cin>>n; // switch(n) // switch . { case'1':strani3();break; case'2':strani2i1ygyl();break; case'3':ygyl2i1strana();break; default:cout<<"izbrete chislo ot 1 do 3"<<endl; } } //ThinkPad T520 ( 4243F53 ) | Intel(R) Core(TM) i5-2520M CPU @ 2.50GHz | Crucial 8GB Ballistix Sport DDR3 @ 1333MHz | SAMSUNG 850 Pro Series ( MZ-7KE128BW ) 128GB 3-D Vertical | Seagate FireCuda Gaming SSHD 2TB ( ST2000LX001 ) | Kernel: 4.4.0-24-generic x86_64 Distro: Ubuntu 16.04 xenial
-
17th December 2009 17:22 #2
-
17th December 2009 19:17 #3
-
17th December 2009 19:23 #4
?
EVGA X299 FTW K|i9-7960X@4.7|4x8 Patriot Viper Steel 4000|GTX 1660 Ti|970 EVO 1 TB|Seasonic Focus GX-1000|Xigmatek Elysium|
Rampage IV Extreme BE|E5-1680v2@4.7|4x4 HyperX 1866|Cougar Aqua 240|GTX 1050 Ti|970 EVO 1/4 TB|CM 850 SilentPro|HAF-X|
-
17th December 2009 20:49 #5
, ,, .
ThinkPad T520 ( 4243F53 ) | Intel(R) Core(TM) i5-2520M CPU @ 2.50GHz | Crucial 8GB Ballistix Sport DDR3 @ 1333MHz | SAMSUNG 850 Pro Series ( MZ-7KE128BW ) 128GB 3-D Vertical | Seagate FireCuda Gaming SSHD 2TB ( ST2000LX001 ) | Kernel: 4.4.0-24-generic x86_64 Distro: Ubuntu 16.04 xenial
-
18th December 2009 23:06 #6
.
ThinkPad T520 ( 4243F53 ) | Intel(R) Core(TM) i5-2520M CPU @ 2.50GHz | Crucial 8GB Ballistix Sport DDR3 @ 1333MHz | SAMSUNG 850 Pro Series ( MZ-7KE128BW ) 128GB 3-D Vertical | Seagate FireCuda Gaming SSHD 2TB ( ST2000LX001 ) | Kernel: 4.4.0-24-generic x86_64 Distro: Ubuntu 16.04 xenial
-
19th December 2009 13:10 #7
, , :
main Triangle ( switch-).Code:struct ThreeSides { double a, b, c; }; struct TwoSidesAndAngle { double side1, side2; double angle; }; struct SideAndTwoAngles { double side; double angle1, angle2; }; union Triangle { ThreeSides variant1; TwoSidesAndAngle variant2; SideAndTwoAngles variant3; };
, Triangle t,
.Code:cin >> t.variant1.a;
(t) , ( t.variant*.* )., . .
"640K ught to be enough for anybody" - Bill Gates, 1981
::Machine specs::Fract::AGG::::Baileys::blog::YouTube channel




Reply With Quote

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