answersLogoWhite

0


Best Answer

All work and no play, makes Jack a dull boy.

User Avatar

Wiki User

12y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Which proverb is A W and N P M J a D B?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Program to find the Transpose of matrix using function?

#include<stdio.h> void transpose(int a[50][50]); void main() { int a[50][50],b[50][50],m,n,i,j; scanf("%d",&m,&n); for(i=0;i<m;i++) { for(j=0;j<n;j++) { scanf("%d",&a[i][j]); } } for(i=0;i<n;i++) { for(j=0;j<m;j++) { scanf("%d",&b[i][j]); } } transpose(a,b,m,n) void transpose(int a[50][50],int b[50][50],int m,int n) { int i; for(i=0;i<m;i++) { for(j=0;j<n;j++) { b[i][j]=a[i][j]; } } }


Write a c program to merge two array?

#include <stdio.h> #include <conio.h> void main(){ int a[10],b[10],c[10],i,j,m,n,tmp,k; printf("\nEnter the size of the 1st array:"); scanf("%d",&m); printf("\nEnter the size of the 2nd array:"); scanf("%d",&n); printf("\nEnter the 1st array values:"); for(i=0;i<m;i++){ scanf("%d",&a[i]); } printf("\nEnter the 2nd array values:"); for(i=0;i<n;i++){ scanf("%d",&b[i]); } for(i=0;i<m;i++) { for(j=0;j<m-i;j++) { if(a[j]>a[j+1]) { tmp=a[j]; a[j]=a[j+1]; a[j+1]=tmp; } } } printf("\n\n Array in the ascending order is - \n"); for(i=0;i<m;i++) { printf("\t %d",a[i]); } for(i=0;i<n;i++) { for(j=0;j<n-i;j++) { if(b[j]>b[j+1]) { tmp=b[j]; b[j]=b[j+1]; b[j+1]=tmp; } } } printf("\n\n Array in the ascending order is - \n"); for(i=0;i<n;i++) { printf("\t %d",b[i]); } i=j=k=0; while(i<n&&j<m) { if(a[i]<b[j]) c[k++]=a[i++]; else if(a[i]>b[j]) c[k++]=b[j++]; else { c[k++]=b[j++]; i++; j++; } } if(i<n) { int t; for(t=0;t<n;t++) c[k++]=a[i++]; } if(j<m) { int t; for(t=0;t<m;t++) { c[k++]=b[j++]; } } printf("\nFinally sorted join array is:"); for(k=0;k<(m+n);k++) printf("\t\n %d ",c[k]); getch(); }


Function to find the transpose of a sparse matrix?

// transpose for the sparse matrix void main() { clrscr(); int a[10][10],b[10][10]; int m,n,p,q,t,col; int i,j; printf("enter the no of row and columns :\n"); scanf("%d %d",&m,&n); // assigning the value of matrix for(i=1;i<=m;i++) { for(j=1;j<=n;j++) { printf("a[%d][%d]= ",i,j); scanf("%d",&a[i][j]); } } printf("\n\n"); //displaying the matrix printf("\n\nThe matrix is :\n\n"); for(i=1;i<=m;i++) { for(j=1;j<=n;j++) { printf("%d\t",a[i][j]); } printf("\n"); } t=0; printf("\n\nthe non zero value matrix are :\n\n"); for(i=1;i<=m;i++) { for(j=1;j<=n;j++) { // accepting only non zero value if(a[i][j]!=0) { t=t+1; b[t][1]=i; b[t][2]=j; b[t][3]=a[i][j]; } } } printf("a[0 %d %d %d\n",m,n,t); for(i=1;i<=t;i++) { printf("a[%d %d %d %d\n",i,b[i][1],b[i][2],b[i][3]); } a[0][1]=n; a[0][2]=m; a[0][3]=t; int s[10],u[10]; if(t>0) { for(i=1;i<=n;i++) { s[i]=0; } for(i=1;i<=t;i++) { s[b[i][2]]=s[b[i][2]]+1; } u[1]=1; for(i=2;i<=n;i++) { u[i]=u[i-1]+s[i-1]; } for(i=1;i<=t;i++) { j=u[b[i][2]]; a[j][1]=b[i][2]; a[j][2]=b[i][1]; a[j][3]=b[i][3]; u[b[i][2]]=j+1; } } printf("\n\n the fast transpose matrix \n\n"); printf("a[0 %d %d %d\n",n,m,t); for(i=1;i<=t;i++) { printf("a[%d %d %d %d\n",i,a[i][1],a[i][2],a[i][3]); } getch(); }


What can you spell with the letters a e m b j y o u w t d i f?

me, a, you, I, b j w t d f


How do you write a C program for matrix addition and multiplication?

#include<stdio.h> #include<conio.h> main() { int a[10][10],b[10][10],c[10][10],m,n,i,j,p,q,op; printf("enter the order of matrix a:n"); scanf("%d",&m,&n); printf("enter the %d elements of a\n",m*); for(i=0;i<m;i++) for(j=0;j<n;j++) scanf("%d",&a[i][j]); printf("enter the order of matrix b:n"); scanf("%d",&p,&q); printf("enter the %d elements of b\n",p*q); for(i=0;i<p;i++) for(j=0;j<q;j++) scanf("%d",&b[i][j]); printf("enter the option\n"); scanf("%d",&option); switch(op) { case '+' : if(m==p&&n==q) printf("the resultant matrix c is:\n"); for(i=0;i<m;i++) for(j=0;j<n;j++) c[i][j]=a[i][j]+b[i][j]; printf("%d",c[i][j]); printf("\n"); break; case '/' : if(n==p) { for(i=0;i<m;;i++); {for(j=0;j<q;j++) {printf("%d",c[i][j]); } } c[i][j]=0; for(p=0;p<n;p++) c[i][j]=c[i][j]+a[i][p]*b[p][j]: } printf("resultant matrix is:\n"); for(i=0;i<m;;i++); {for(j=0;j<q;j++) {printf("%d\t",c[i][j]); } } printf("\n"); getch(); }


Who is the fastest guy in nrl?

well in 2009 it's out of the following people: J. Hayne B. Marshall M. Bowen J. Yow Yeh? D. Boyd S. Perrit? G. Inglis B. Stewart? J. Soward B. Slater B. Morris J. Morris M. Jennings D. Mean? Your Choice? ....


C program for counting sort?

#include<stdio.h> #include<conio.h> void main() { clrscr(); int i,j,m,a[20],b[20],c[20],max; printf("enter no of elements"); scanf("%d",&m); printf("enter elements"); for(i=0;i<=m;i++) { scanf("%d",&a[i]); } max=a[i]; for(i=0;i<=m;i++) { if(max<a[i]) { max=a[i]; } } for(i=0;i<=max;i++) { c[i]=0; } for(j=0;j<=m;j++) { c[a[j]]=c[a[j]]+1; } for(i=0;i<=max;i++) { c[i]=c[i]+c[i-1]; } for(j=m;j>=1;j--) { b[c[a[j]]]=a[j]; c[a[j]]=c[a[j]]-1; } printf("AFTER SORTING"); for(i=0;i<=m;i++) { printf("%d",b[i]); } getch(); }


Why is o?

a b c d e f g h i j k l m n OOOOOOOOOOOOOOO a b c d e f g h i j k l m n OOOOOOOOOOOOOOO


When did M. J. B. Baddeley die?

M. J. B. Baddeley died in 1906.


C program for matrix minima method?

/* PROGRAM BY SOUMEN KARMAKAR College of Engineering and Management ,Kolaghat 3rd Year Information Technology Note: Compile the program under Linux environment using gcc. If you want to compile it under turbo c then modify the program */ // Program to solve matrix Minima (Transportation Problem) #include <stdio.h> void input_data(int a[][10],int b[][10],int s[10],int d[10]); void show_data(int a[][10],int b[][10],int s[10],int d[10]); void matrix_min(int a[][10],int b[][10],int s[10],int d[10]); int m,n; int main(void) { int a[10][10],b[10][10],s[10],d[10]; printf("\nEnter the no of supply & demand\n"); scanf("%d %d",&m,&n); input_data(a,b,s,d); show_data(a,b,s,d); matrix_min(a,b,s,d); return (0); } void input_data(int a[][10],int b[][10],int s[10],int d[10]) { int i,j; printf("\nEnter the cost matrix\n"); for(i=0;i<m;i++) { for(j=0;j<n;j++) scanf("%d",&a[i][j]); } for(i=0;i<m;i++) { for(j=0;j<n;j++) b[i][j]=-1; } printf("\nEnter the supply \n"); for(i=0;i<m;i++) scanf("%d",&s[i]); printf("\nEnter the demand\n"); for(i=0;i<n;i++) scanf("%d",&d[i]); } void show_data(int a[][10],int b[][10],int s[10],int d[10]) { int i,j; printf("\n \t\t\tSupply\n"); for(i=0;i<m;i++) { printf("\n"); for(j=0;j<n;j++) { printf("%d (%d) ",a[i][j],b[i][j]); } printf(" | %d",s[i]); } printf("\n------------------------\n"); printf("\nDemand "); printf("%d ",d[i]); } void matrix_min(int a[][10],int b[][10],int s[10],int d[10]) { int i,j,s1,d1,cost,min,t1,t2,sd; int tag[10][10]; s1=0; d1=0; for(i=0;i<m;i++) { s1=s1+s[i]; } printf("\nsupply= %d",s1); for(j=0;j<n;j++) { d1=d1+d[j]; } printf("\ndemand= %d",d1); if(s1!=d1) printf("\nIt is unbalanced\nSo new table is\n\n"); if(s1>d1) { n++; for(i=0;i<m;i++) { a[i][n-1]=0; b[i][n-1]=-1; } d[n-1]=s1-d1; d1=s1; show_data(a,b,s,d); } else if(s1<d1) { m++; for(j=0;j<n;j++) { a[m-1][j]=0; b[m-1][j]=-1; } s[m-1]=d1-s1; s1=d1; show_data(a,b,s,d); } //MAIN CALCULATION for(i=0;i<m;i++) { for(j=0;j<n;j++) { tag[i][j]=-1; } } printf("\nTag matrix \n"); for(i=0;i<m;i++) { printf("\n"); for(j=0;j<n;j++) { printf("%d ",tag[i][j]); } } cost=0; sd=0; while(sd!=s1) { for(i=0;i<m;i++) { for(j=0;j<n;j++) { if(tag[i][j]==-1) { min=a[i][j]; t1=i; t2=j; break; } } } for(i=0;i<m;i++) { for(j=0;j<n;j++) { if(tag[i][j]==-1) { if(min>a[i][j]) { min=a[i][j]; t1=i; t2=j; } } } } printf("\nMin =%d\n",min); if(d[t2]==s[t1]) { cost=cost+a[t1][t2]*s[t1]; b[t1][t2]=s[t1]; sd=sd+s[t1]; d[t2]=0; s[t1]=0; show_data(a,b,s,d); for(j=0;j<n;j++) { if(tag[t1][j]==0) continue; tag[t1][j]=0; } for(i=0;i<m;i++) { if(tag[i][t2]==0) continue; tag[i][t2]=0; } printf("\nTag matrix \n"); for(i=0;i<m;i++) { printf("\n"); for(j=0;j<n;j++) { printf("%d ",tag[i][j]); } } } else if(d[t2]>s[t1]) { cost=cost+a[t1][t2]*s[t1]; b[t1][t2]=s[t1]; sd=sd+s[t1]; d[t2]=d[t2]-s[t1]; s[t1]=0; show_data(a,b,s,d); for(j=0;j<n;j++) { if(tag[t1][j]==0) continue; tag[t1][j]=0; } printf("\nTag matrix \n"); for(i=0;i<m;i++) { printf("\n"); for(j=0;j<n;j++) { printf("%d ",tag[i][j]); } } } else { cost=cost+a[t1][t2]*d[t2]; b[t1][t2]=d[t2]; sd=sd+d[t2]; s[t1]=s[t1]-d[t2]; d[t2]=0; show_data(a,b,s,d); for(i=0;i<m;i++) { if(tag[i][t2]==0) continue; tag[i][t2]=0; } printf("\nTag matrix \n"); for(i=0;i<m;i++) { printf("\n"); for(j=0;j<n;j++) { printf("%d ",tag[i][j]); } } } } printf("\nCost is =%d\n",cost); } // Thank You.........


Write the program in c language for the addition of two matrices using pointer?

#include<stdio.h> #include<conio.h> int main() { int n,m,i,j,k; int a[38][38],b[38][38],p[38][38]; printf("\nEnter the number of rows and coloumns "); scanf("%d %d",&n,&m); printf("\nEnter the elements of first matrix "); for(i=0;i<n;i++) { for(j=0;j<m;j++) { scanf("%d",(*(a+i)+j)); } } printf("\nMatrix is "); for(i=0;i<n;i++) { printf("\n"); for(j=0;j<m;j++) { printf("%d",*(*(a+i)+j)); printf("\t"); } } printf("\nEnter the elements of second matrix "); for(i=0;i<n;i++) { for(j=0;j<m;j++) { scanf("%d",(*(b+i)+j)); } } printf("\nMatrix is "); for(i=0;i<n;i++) { printf("\n"); for(j=0;j<m;j++) { printf("%d",*(*(b+i)+j)); printf("\t"); } } printf("\nAfter ");


Program for row wise sort for a square matrix in C?

#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(); }