Printf("\nEnter three 2D vectors in form of 2x3 matrix A: ")


Download 11.94 Kb.
Sana16.06.2023
Hajmi11.94 Kb.
#1502171
Bog'liq
xos son


#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;


}

Download 11.94 Kb.

Do'stlaringiz bilan baham:




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