1-amaliy topshiriq 12-misol Uchburchak tomonlari berilgan bo‘lsa, uning medianalarini toping. #include
Download 201.59 Kb.
|
- Bu sahifa navigatsiya:
- include using namespace std; int main() { float a,b,c,m;
630-20 guruh talabasi Isroilov Dostonbekningdasturlash 1 fanidan topshiriqlarga yozgan javoblari 1-amaliy topshiriq 12-misol Uchburchak tomonlari berilgan bo‘lsa, uning medianalarini toping. #include #include using namespace std; int main() { float a,b,c,m; cout<<"a tomonni kititing ";cin>>a; cout<<"b tomonni kititing ";cin>>b; cout<<"c tomonni kiriting ",cin>>c; m=(sqrt(2*b*b+2*c*c-a*a))/2; cout<<"javob "< return 0; } Natija: 2 -amaliy topshiriq 12-misol #include #include using namespace std; int main() { float x, y; cout<<"x ni kiriting "; cin>>x; if(x>10){y=3*pow(x, 4)-4*x;} if(1<=x<=10) {y=5*pow(x, 3)+12*x;} if(x<1){y=3*pow(cos(x), 4)+4;} cout<<"Natija "< return 0; } Natija: 3 -amaliy topshiriq 12-misol Oy raqamini kiriting. Shu oy qaysi faslda ekanligini ekranda chiqaruvchi dastur tuzilsin. (masalan: may oyining tartib raqami 5 kiritilsa, javob: Bahor) int a; cout<<"oy raqamini kiriting kiriting"< cin>>a; switch(a) { case 3:cout<<"bahor";break; case 4:cout<<"bahor";break; case 5:cout<<"bahor";break; case 6:cout<<"yoz";break; case 7:cout<<"yoz";break; case 8:cout<<"yoz";break; case 9:cout<<"kuz";break; case 10:cout<<"kuz";break; case 11:cout<<"kuz";break; case 12:cout<<"qish";break; case 1:cout<<"qish";break; case 2:cout<<"qish";break; default :cout<<"siz noto'g'ri raqam kiritdingiz"; break; ----Tahrirlandi---- int a; cout<<"oy raqamini kiriting kiriting"< cin>>a; switch(a) { case 3:cout<<"bahor";break; case 4:cout<<"bahor";break; case 5:cout<<"bahor";break; case 6:cout<<"yoz";break; case 7:cout<<"yoz";break; case 8:cout<<"yoz";break; case 9:cout<<"kuz";break; case 10:cout<<"kuz";break; case 11:cout<<"kuz";break; case 12:cout<<"qish";break; case 1:cout<<"qish";break; case 2:cout<<"qish";break; default :cout<<"siz noto'g'ri raqam kiritdingiz"; break; } Natija: Download 201.59 Kb. Do'stlaringiz bilan baham: |
Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling
ma'muriyatiga murojaat qiling