Some of ways to solve this problem is to use four nested loops for().Something like following:...const int limit = 1000;//some code herefor (int i(0); i
//the following code will help you to write the program for(i=n-1, j=0; i > 0; i--, j++) //n is the order of the square matrix { for(k=j; k < i; k++) printf("%d ", a[j][k]); for(k=j; k < i; k++) printf("%d ", a[k][i]); for(k=i; k > j; k--) printf("%d ", a[i][k]); for(k=i; k > j; k--) printf("%d ", a[k][j]); } m= (n-1)/2; //calculate the position of the middle element if (n% 2 == 1) printf("%d", a[m][m]);//to print the middle element also //9809752937(udanesh)
/*PROGRAM TO IMPLEMENT GAUSS-jordan method.#include#define MX 20main(){float a[MX] [MX+1],m,p;int i,j,k,n;puts("\n how many equations?:");scanf("%d",&n);for(i=0;i
k = you - int (you / j) * j; You can also use, if your language supports the modulus (%) operator... k = you % j;
#include<stdio.h> #include<conio.h> void main() { int a[10][10],i,j,k,m,n; printf("enter the order"); scanf("%d",&m,&n); for(i=0;i<m;i++) { for(j=0;j<n;j++) { scanf("%d",&a[i][j]); } } for(k=0;k<m;k++) { for(i=0;i<=m-1;i++) { for(j=0;j<n-i-1;j++) { if(a[k][j]>a[k][j+1]) temp=a[k][j]; a[k][j]=a[k][j+1]; a[k][j+1]=temp; } } } for(i=0;i<m;i++) { for(j=0;j<n;j++) { printf("sorted matrix=%d",a[i][j]); } } getch(); }
j=-3 and k=2
a = 4.0 i - 3.0 j + 1.0 k b = -1.0 i + 1.0 j + 4.0 k → a + b = (4.0 + -1.0) i + (-3.0 + 1.0) j + (1.0 + 4.0) k = 3.0 i - 2.0 j + 5.0 k → a - b = (4.0 - -1.0) i + (-3.0 - 1.0) j + (1.0 - 4.0) k = 5.0 i - 4.0 j - 3.0 k → a - b + c = 0 → c = -(a - b) = -5.0 i + 4.0 j + 3.0 k So that a - b + c = (5.0 - 5.0) i + (-4.0 + 4.0) j + (-3.0 + 3.0) k = 0 i + 0 j + 0 k = 0.
Some of ways to solve this problem is to use four nested loops for().Something like following:...const int limit = 1000;//some code herefor (int i(0); i
"K" could be located at 7.
that kevin new that he wasnt going to live long but he kept trying
cooking a turkey?
J and K
K comes after J.
j for attack k for defend and l for jump bat s+k+j leamasex j+k+l+j+k+l+s+j+k
//the following code will help you to write the program for(i=n-1, j=0; i > 0; i--, j++) //n is the order of the square matrix { for(k=j; k < i; k++) printf("%d ", a[j][k]); for(k=j; k < i; k++) printf("%d ", a[k][i]); for(k=i; k > j; k--) printf("%d ", a[i][k]); for(k=i; k > j; k--) printf("%d ", a[k][j]); } m= (n-1)/2; //calculate the position of the middle element if (n% 2 == 1) printf("%d", a[m][m]);//to print the middle element also //9809752937(udanesh)
The energy E in joules (J) is equal to 1 kilojoule times 1000: E (J) = 1kJ × 1000 = 1000J . So 1 kilojoule (kJ) is equal to 1000 joules (J): 1 kJ = 1000 J .
%%%fim1 is our image%%% [ r c ] = size(fim1); even=zeros(r,(c/2)); %first level decomposition %one even dimension for j = 1:1:r a=2; for k =1:1:(c/2) even(j,k)=fim1(j,a); a=a+2; end end %one odd dim odd=zeros(r,(c/2)); for j = 1:1:r a=1; for k =1:1:(c/2) odd(j,k)=fim1(j,a); a=a+2; end end [ lenr lenc ]=size(odd) ; %one dim haar for j = 1:1:lenr for k =1:1:lenc fhigh(j,k)=odd(j,k)-even(j,k); flow(j,k)=even(j,k)+floor(fhigh(j,k)/2); end end %2nd dimension [len2r len2c ]=size(flow); for j = 1:1:(len2c) a=2; for k =1:1:(len2r/2) %even separation of one dim leven(k,j)=flow(a,j); heven(k,j)=fhigh(a,j); a=a+2; end end %odd separtion of one dim for j = 1:1:(len2c) a=1; for k =1:1:(len2r/2) lodd(k,j)=flow(a,j); hodd(k,j)=fhigh(a,j); a=a+2; end end %2d haar [ len12r len12c ]=size(lodd) ; for j = 1:1:len12r for k =1:1:len12c %2nd level hh f2lhigh(j,k)=lodd(j,k)-leven(j,k); %2nd level hl f2llow(j,k)=leven(j,k)+floor(f2lhigh(j,k)/2); %2nd level lh f2hhigh(j,k)=hodd(j,k)-heven(j,k); %2nd level ll f2hlow(j,k)=heven(j,k)+floor(f2hhigh(j,k)/2); end end % level=level-1;