4 Strings on a Double Bass
#include#includevoid main(){int a[10][10],b[10][3],r,c,s=0,i,j;clrscr();printf("\nenter the order of the sparse matrix");scanf("%d%d",&r,&c);printf("\nenter the elements in the sparse matrix(mostly zeroes)");for(i=0;i
We can use the law B=(1+d)*S where B is the bandwidth S is the signal rate d is between 0 and 1 (depend on modulation and filtering) Thanks
/* 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.........
4 Strings on a Double Bass.
D. B.'s Delight was created in 1977.
// 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(); }
Everyone i am ajay Verma and i answer this question, Write this programe in note pad:- using System; class MyClass { public static void Main(string [] args) { int n,d,result=1,sum=0; Console.WriteLine("Enter any Number"); n=Convert.ToInt32(Console.ReadLine()); for(;n>0;) { d=n%10; Console.WriteLine(d); n=n/10; } } }
B i r d
Arrange the diamond and sticks like this on a crafting table. HAVE FUN! LOL! S=Stick D=Diamond B=Blank B D B B D B B S B
like this L À FË@ Ù% xJÄRNaïŸ·Ä Ù% xJÄ Ê§ ù PàOÐ ê:i¢Ø +00 /C:\ J 1 U1N- PROGRA~1 2 ï¾U1mMU1N- P r o g r a m F i l e s : 1 U1K- iTunes $ ï¾U1K-U1K- i T u n e s F 2 ʧ Ä0© iTunes.exe , ï¾Ä0©U1K- i T u n e s . e x e Q - P øCŒ C:\Program Files\iTunes\iTunes.exe . . . \ . . \ . . \ . . \ . . \ P r o g r a m F i l e s \ i T u n e s \ i T u n e s . e x e m C : \ W I N D O W S \ I n s t a l l e r \ { 0 0 F C 6 7 9 9 - 8 6 6 E - 4 4 A 1 - A 6 0 C - D C F 3 9 4 C F 5 6 F D } \ N e w S h o r t c u t 3 _ 3 5 A F D 4 9 5 E C 2 E 4 B 2 B B 9 D B 3 0 E E B C 7 4 0 4 9 D . e x e %SystemRoot%\Installer\{00FC6799-866E-44A1-A60C-DCF394CF56FD}\NewShortcut3_35AFD495EC2E4B2BB9DB30EEBC74049D.exe t e ÿÿÿÿ Àê~ ŽÜýv ë~ ìê~ èê~ Lë~ ë~ ë~ ìê~ dë~ /Ýývð. 82ývdë~ "è~ Lë~ àé~ èê~ ìê~ ë~ @"é~ ÿÿÿÿ è~ 2'| % S y s t e m R o o t % \ I n s t a l l e r \ { 0 0 F C 6 7 9 9 - 8 6 6 E - 4 4 A 1 - A 6 0 C - D C F 3 9 4 C F 5 6 F D } \ N e w S h o r t c u t 3 _ 3 5 A F D 4 9 5 E C 2 E 4 B 2 B B 9 D B 3 0 E E B C 7 4 0 4 9 D . e x e _ _ R _ 0 0 0 0 0 0 ¨é~ 2'| ¨ Àé~ 2'| x h%¶˜é~ «'|Üë~ î|8'|ÿÿÿÿôé~ 2'| 'à|ù±€|ÿÿÿÿ øé~ $ èå8} I²€| "î~ åÜ ê~ ÈŸ \ì~ î|8'|ÿÿÿÿ2'|«'|ë'| ÈŸ C xî~ |ë~ Èê~ î|xû|ÿÿÿÿqû| & w ` X your-03667082de ²×ÚÕÓ•NˆC7Y(sI7«Ñ®B#Ù"F àL™ ²×ÚÕÓ•NˆC7Y(sI7«Ñ®B#Ù"F àL™
Well I don't know about 4 4's, but with 3 you can do: 4/4=1 1x4=4 OR 4x4=16 16/4=4 Soz! B¬D
D. B. S. Jeyaraj was born on 1954-05-21.