7- laboratoriya ishi. Sonli sinflar bilan ishlash. Ifodani sintaksis tahlil qilish


Download 36.07 Kb.
Sana24.12.2022
Hajmi36.07 Kb.
#1053468
Bog'liq
Nodirbek 7-lab


Xaytmetov Nodirbek 913-21 guruh
7- LABORATORIYA ISHI.
Sonli sinflar bilan ishlash. Ifodani sintaksis tahlil qilish

          1. 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;
}



Download 36.07 Kb.

Do'stlaringiz bilan baham:




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling