/* * @(#) smt2_3.c - Program for determining matrix of the battle effectiveness * (Task 2_3 at the Special Military Training course). * (c) 1997 Ivan Maidanski http://ivmai.chat.ru * Freeware program source. All rights reserved. ** * Language: ANSI C * Tested with: Borland C++ v3.1 * Last modified: 1997-05-04 20:20:00 GMT+04:00 */ #include #include #define G 9.81 #define MAX_N 10 #define MAX_M 10 int main(void) { int n,m; float zmax,r2; float q[MAX_M][MAX_N]; float c[MAX_M],ng[MAX_M],v[MAX_M],bt[MAX_M]; float p[MAX_N],bs[MAX_N]; int i,j; float d,rmin,phi1s,phi2s,phi1t,phi2t; printf("n= "); scanf("%d",&n); printf("m= "); scanf("%d",&m); printf("z_max= "); scanf("%f",&zmax); printf("R2= "); scanf("%f",&r2); printf("\n"); for (j=0;j=phi1t ? phi1s : phi1t; phi2s=phi2s<=phi2t ? phi2s : phi2t; q[j][i]=phi2s-phi1s; q[j][i]=q[j][i]>0.0 ? q[j][i]/d : 0.0; } } for (j=0;j