Xaytmetov Nodirbek 913-21 guruh
7- LABORATORIYA ISHI.
Sonli sinflar bilan ishlash. Ifodani sintaksis tahlil qilish
Ishning maqsadi: Sonli sinflarni o’rganish va Ifodani sintaksis tahlil qilishni o’rganish
Complex sinfidan foydalanib, ikkita kompleks sonlarni qo'shing.
#include
#include
using namespace std;
int main()
{
complexa(30,75);
complexb(70,25);
complex c=a+b;
cout<}
.Complex sinfidan foydalanib ikkita komplex sonlarni bòling.
#include
#include
using namespace std;
int main()
{
complex< double> a(10,5);
complex< double>b(15,6);
complexc=a/b;
cout<}
Complex sinfidan foydalanib ikkita kompleks sonlarni ayiring.
#include
# include
using namespace std;
int main()
{
complex< double>x( 50,20);
complex< double> y(49,19);
complex< double>z= x- y;
cout<< z<< endl;
}
Do'stlaringiz bilan baham: |