ConsoleApplication25. cpp : main project file


Download 90.17 Kb.
bet1/2
Sana20.11.2020
Hajmi90.17 Kb.
#148726
  1   2
Bog'liq
19 00


// ConsoleApplication25.cpp : main project file.
#include "stdafx.h"

#include

#include

using namespace System;

using namespace std;

int main (){

int a,b,c;

cout<<" a-> "; cin>>a;

cout<<" b-> "; cin>>b;

cout<<" c-> "; cin>>c;

float x,Y;

x=(pow(a,2)-pow(b,2))/(pow(c,2)-pow(b,2));

if (x>=0)

{

Y=((pow(a,2)+pow(b,2))/c)+(sqrt(a*a+x));

}

else

{

Y=(sin(x)+b)/(a-b);

}

cout<<"\n Natija Y= "<<Y<<endl;

system("pause");

}





// ConsoleApplication26.cpp : main project file.
#include "stdafx.h"

#include

using namespace System;

using namespace std;

int max (float a, float b, float c){

if (a>b && a>c) return a;

if (b>a && b>c) return b;

if (c>a && c>b) return b;

}

int max (float a, float b){

if (a>b) return a;

if (b>a) return b;

}

int min(float a, float b){

if (a<b) return a;

if (b<a) return b;

}

int main (){

float x,y,z;

cout<<" x ni kiriting -> "; cin>>x;

cout<<" y ni kiriting -> "; cin>>y;

cout<<" z ni kiriting -> "; cin>>z;

cout<<" a) "<<max(x,y,z)<<" ga teng \n";

cout<<" b) "<<max(x,y)+min(y,z)<<" ga teng \n";

cout<<" d) "<<max(x+y+z,x*y*z)<<" ga teng \n";

cout<<" e) "<<min((x+y+z)/2,(x*z+1))<<" ga teng \n\n";

system("pause");

return 0;

}




Download 90.17 Kb.

Do'stlaringiz bilan baham:
  1   2




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