I'll Die For Jesus?
#include<stdio.h> int main () { int array[6][4] ={19,43,43,23,30,13}; int i,j; for(i=0;i<6;i++) for(j=o;j<4;j++) printf("array[%d][%d]=%d\n,"i.j.array[i][j]); return 0; }
void main() { int arr[4][4]; int i,j,a,b,f; printf("\nInput numbers to 4*4 matrix"); for(i=0;i<4;i++) { for(j=0;j<4;j++) { printf("\nKey in the [%d][%d]) value",i+1,j+1); scanf("%d",&arr[i][j]); } } for(i=0;i<4;i++) { for(j=0,f=0;j<4;j++) { if(i!=j&&f==0) continue; a=arr[i][j]; b=arr[j][i]; arr[i][j]=b; arr[j][i]=a; f=1; } } for(i=0;i<4;i++) { for(j=0;j<4;j++) printf("%d ",arr[j][i]); printf("\n"); } }
he meant juvenile delenquint.
//to multiply two matrices... #include<stdio.h> main() { int a[4][4]; int b[4][4]; int c[4][4]; int i,j,k; printf("\n Enter elements into the first matix....\n"); for(i=0;i<4;i++) { for(j=0;j>4;j++) { scanf("%d",&a[i][j]); } } printf("\n Enter elements into the second matrix.....\n"); for(i=0;i<4;i++) { for(j=0;j<4;j++) { scanf("%d",&b[i][j]); } } printf("\n 1st Matrix.....\n"); for(i=0;i<4;i++) { for(j=0;j<4;j++) { printf("\t%d",a[i][j]); } printf("\n"); } printf("\n 2nd Matrix......\n); for(i=0;i<4;i++) { for(j=0;j<4;j++) { printf("\t%d",b[i][j]); } printf("\n"); } for(i=0;i<4;i++) { for(j=0;j<4;j++) { for(k=0;k<4;k++) { c[i][j]+=(a[i][k]*b[k][j]); } } } printf("\n Resultant Matrix...\n"); for(i=0;i<4;i++) { for(j=0;j<4;j++) { printf("\t%d",c[i][j]); } printf("\n"); } }
#include<stdio.h> #include<conio.h> main() { int a[4][4],b[4][4],c[4][4],i,j; printf("enter the elements of matrix a"); for(i=0;i<=3;i++) for(j=0;j<=3;j++) scanf("%d",&a[i][j]); printf("the first matris is"); for(i=0;i<=3;i++) { printf("\n"); for(j=0;j<=3;j++) printf("%d",a[i][j]); } printf("Enter the elements of second matrix"); for(i=0;i<=3;i++) for(j=0;j<=3;j++) scanf("%d",&b[i][j]); printf("the second matrix is"); for(i=0;i<=3;i++) { printf("\n"); for(j=0;j<=3;j++) printf("%d",b[i][j]); } for(i=0;i<=4;i++) for(j=0;j<=4;j++) c[i][j]=a[i][j] + b[i][j]; printf("the addition of matrix is"); for(i=0;i<=3;i++) { for(j=0;j<=3;j++) printf("%d\t",c[i][j]); printf("\n"); } getch(); }
J. D. P. Bolton has written: 'Glory, jest, and riddle' -- subject(s): History, Religious aspects, Christianity, Human beings, Religious aspects of History 'Aristeas, of Proconnesus'
M. J. Riddle has written: 'Characterization and treatment of fish processing plant effluents in Canada'
Nested loop, you mean; one loop in the other loop, eg: for (i=0; i<10; ++i) { for (j=0; j<i; ++j) { printf ("i=%d, j=%d\n", i, j); } }
4 elephants on a jumbo jet
#include<stdio.h> #include<conio.h> void main() { int i,j,k,l,m; clrscr(); for(i=0;i<4;i++) { for(j=i+1;j<=4;j++) { printf("%d",j); } for(k=1;k<=i;k++) { printf("%d",k); } printf("\n"); for(k=i;k>=1;k--) { printf("%d",k); } for(j=4;j>=i+1;j--) { printf("%d",j); } getch(); }
30 Days in June
jupiter had 12 days