Topshirish. Berilgan misolni Laplas usulida va p bir XIL bo’lganda yechishni C++ dasturlash tilida dasturini tuzish. Dasturi
Download 90.88 Kb.
|
7 20 Safoyeva Dilnoza
Topshirish. Berilgan misolni Laplas usulida va P bir xil bo’lganda yechishni C++ dasturlash tilida dasturini tuzish. DASTURI #include using namespace std; int main() { float a[100][100]={},b[100]={},p,max; int n,m,i,c; double s=0; cout<<"Assalom alekum"< cout<<"Ustun sonini kiriting=="; cin>>n; cout<<"Satr sonini kiriting=="; cin>>m; for(int i=1; i<=n; i++) { for(int j=1; j<=m; j++) { cout<<"a["<>a[i][j]; } } cout<<"||||||||||||||||||||||||||||||||||||||||||||||||||||||||"< for(int j=1; j<=m; j++) { cout<<"|"<<"T"< cout<<"\n"; cout<<"----------------------------------------------------"< { cout<<"A"<for(int j=1; j<=m; j++) { cout<} cout<<"\n"; } for(int i=1; i<=n; i++) { s=0; for(int j=1; j<=m; j++) { s=s+a[i][j]; } b[i]=s/p; } cout<<"----------------------------------------------------"< for(int j=1; j<=m; j++) { cout<<"|"<<"T"< cout<<"\t"<<"|"<<"P"; cout<<"\n"; cout<<"----------------------------------------------------"< { cout<<"A"<for(int j=1; j<=m; j++) { cout<} cout<<"\t"<<"|"< cout<<"\n"; } cout<<"----------------------------------------------------"< for(int j=1; j<=m; j++) { cout<<"|"<<"T"< cout<<"\t"<<"|"<<"P"; cout<<"\n"; cout<<"----------------------------------------------------"< { cout<<"A"<for(int j=1; j<=m; j++) { cout<} cout<<"\t"<<"|"< cout<<"\t"<<"|"<cout<<"\n"; } max=b[i]; for(int i=1; i<=n; i++) { if(max>=b[i]) { max=max; c=i; } else { max=b[i]; c=i; } } cout<<"----------------------------------------------------"< } NATIJA: Download 90.88 Kb. Do'stlaringiz bilan baham: |
Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling
ma'muriyatiga murojaat qiling