Alisherov Muhiddin 3-mavzu labaratoriya ishi
714-20 guruh 5-masala 1-jadval
BOSHLASH
Mavzu: Tarmoqlanish va uzilishlarni tashkil etish operatorlari.
#include
#include
#include
m, n, d,
using namespace std;
int main()
{
double m,n,d,Y;
cout<<"m=";cin>>m;
;
cout<<"d=";cin>>d;
cout<<"n=";cin>>n;
if(d>1)
{
Y=pow((n*m*m+d),2);
Y
}
if(d<=1)
{
Y=d/(n*n+m*m);
}
TAMOM
cout<<"y="<
}
1-
2-
5-masala 2-jadval
#include
#include
#include
using namespace std;
int main()
{
double x,y,z,q,w,e,r,t,u;
cout<<"x="; cin>>x;
cout<<"y="; cin>>y;
cout<<"z="; cin>>z;
if(x>0&&y>0&&z>0)
{
q=2*x;cout<<"2x=";cout<
w=2*y;cout<<"2y=";cout<
e=2*z;cout<<"2z=";cout<
}
else
{
r=-1*x;cout<<"x=";cout<
t=-1*y;cout<<"y=";cout<
u=-1*z;cout<<"z=";cout<
}
return getch () }
Mavzu: Switch case tanlash operatoridan foydalanib, o’zgaruvchilarning barcha qiymatlari uchun funkstiyani hisoblash dasturini tuzing.
Case5
#include
#include
#include
using namespace std;
int main()
{float A, B, C ;
int x;
cout<<" A bn B ni 1-qo'shish, 2-ayirish, 3-bo'lish, 4-ko'paytirish" <
cout<<"x=" ;cin>>x;
cout<<"A="; cin>>A;
cout<<"B="; cin>>B;
;
switch (x)
{
case 1: cout<<"C="<
case 2: cout<<"C="<
case 3: cout<<"C="<
case 4: cout<<"C="<
default: cout<<"Hato\n";
}
main ();
}
Do'stlaringiz bilan baham: |