2-variant hisoblash grafik ishi
Masalaning qo`yilishi
1. berilgan bo’lsa, ni
hisoblang.
boshlash
2. Blok–sxemasini tuzamiz:
Tamom
i<=n
j<=n
C[i,j]=sqrt(a[i,j])-pow(2,b[i,j])
i++ ; j++
i=1 ; j=1
i<=n
j<=n
i++ ; j++
i=1 ; j=1
a[i,j] ;b[i,j]
n
yo`q ha
ha
yo`q
3.C++ tilida dasturini tuzamiz:
#include
#include
using namespace std;
int main()
{
int i,j,n;
float A[10][10];
float B[10][10];
float C[10][10];
cout<<"n=";
cin>>n;
for (i=1;i<=n;i++)
for (j=1;j<=n;j++)
{
cout<<"A["<
cin>>A[i][j];
}
for (i=1;i<=n;i++)
for (j=1;j<=n;j++)
{
cout<<"B["<
cin>>B[i][j];
}
for (i=1;i<=n;i++)
for (j=1;j<=n;j++)
{
C[i][j]=sqrt(A[i][j])-pow(2,B[i][j]);
cout<<"C["<
}
system("PAUSE");
return 0;
}
Olingan natijalar.
Do'stlaringiz bilan baham: |