Qudratov abdulloh 310-20 guruh 3-labaratoriya ishi variant №7


Download 308.37 Kb.
bet2/2
Sana24.11.2020
Hajmi308.37 Kb.
#151286
1   2
Bog'liq
QUDRATOV ABDULLOH

#include

#include

using namespace std;

int main(){

int a1, a2, a3, a4;

cout<<"a1= "; cin>>a1;

cout<<"a2= "; cin>>a2;

cout<<"a3= "; cin>>a3;

cout<<"a4= "; cin>>a4;

if (a1!=a2 && a2==a3 && a3==a4) cout<<"Birinchida turgan son teng emas\n\n";

else if(a1==a3 && a2!=a3 && a1==a4) cout<<"ikkinchida turgan son teng emas\n\n";

else if (a1==a2 && a2!=a3 && a2==a4) cout<<"Uchinchida turgan son teng emas\n\n";

else if (a1==a2 && a2==a3 && a3!=a4) cout<<"To'rtinchida turgan son teng emas\n\n";

else if (a1==a2 && a2==a3 && a3==a4) cout<<"Barcha sonlar teng\n\n";

else cout<<"Hamma sonlar har xil\n\n";

main();


}

///////////////////////////////////////////////////////////////////

1 – JADVAL , 3-MISOL:

#include

#include

using namespace std;

int main(){

float a, b, x, Z;

cout<<"a= "; cin>>a;

cout<<"b= "; cin>>b;

cout<<"x= "; cin>>x;

if (a>=0) Z=7*pow(x,2) - 3*a*b - 5*a*b;

else Z=15*a - 7*b;

cout<<"Z = "<

main();

return 0;



}

\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

CASE 6:

#include



#include

using namespace std;

int main(){

float b; int x;

UZUNLIK: cout<<"Uzunlik birliklarini quyidagi tartibda kiriting: 1-detsimetr, 2-kilometr, 3-metr, 4-millimetr, 5-santimetr\n\n"; cin>>x;

cout<<"Tanlangan birligingizdagikesma uzunligini kiriting : "; cin>>b;

switch (x){

case 1: cout<

case 2: cout<

case 3: cout<

case 4: cout<

case 5: cout<

default: cout<<"Noto'g'ri birlik kitilgan!!!\n\n\n\n"; goto UZUNLIK;

}

main();



return 0;

}



///////////////////////////////////////////////////////////////////
Download 308.37 Kb.

Do'stlaringiz bilan baham:
1   2




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