#include
#include
using namespace std;
int main()
{ float a[2][2];
int i,j;
printf("\nEnter three 2D vectors in form of 2x3 matrix A: ");
for(i=0; i<2; i++)
{
for(j=0; j<2; j++)
{
printf("\n Son a[%d][%d]: ", i,j);
scanf("%f", &a[i][j]);
}
}
for( i=0; i<2; i++)
{
for(j=0; j<2; j++)
{
cout<< a[i][j]<<" ";
}
}
float B2,c,sq,B,r1,r2;
B2=(-a[0][0]-a[1][1])*(-a[0][0]-a[1][1]);
c= (4*a[0][0]*a[1][1])-(4*a[0][1]*a[1][0]);
sq=sqrt(B2-c);
B=(a[0][0])+(a[1][1]);
r1=(B+sq)/2;
r2=(B-sq)/2;
cout<<"Xos son1 ="<cout<<"Xos son12 ="<cout<< "\n";
return 0;
}
Do'stlaringiz bilan baham: |