answersLogoWhite

0

Search results

#include<stdio.h>

void main()

{

int a[3][3],b[3][3],c[3][3],i,j,k;

clrscr();

printf("Enter elements of A:");

for(i=0;i<=2;i++)

for(j=0;j<=2;j++)

scanf("%d",&a[i][j]);

printf("Enter elements of B:");

for(i=0;i<=2;i++)

for(j=0;j<=2;j++)

scanf("%d",&b[i][j]);

printf("A:");

for(i=0;i<=2;i++)

{

for(j=0;j<=2;j++)

printf("%d ",a[i][j]);

printf("");

//To change line.

}

printf("B:");

for(i=0;i<=2;i++)

{

for(j=0;j<=2;j++)

printf("%d ",b[i][j]);

printf("");

}

k=0;

while(k<=2)

{

for(i=0;i<=2;i++)

{

int sum=0;

for(j=0;j<=2;j++)

sum=sum+a[i][j]*b[j][k];

c[i][k]=sum;

}

k++;

}

printf("Result: ");

for(i=0;i<=2;i++)

{

for(j=0;j<=2;j++)

printf("%d ",c[i][j]);

printf("");

}

getch();

}

1 answer


B-J- and the Bear - 1978 B-J- and the Seven Lady Truckers Part 2 3-2 was released on:

USA: 13 January 1981

1 answer


(1) M+B=2*J

(2) M=8+B

(3) J+B=20

Three equations. Three unknowns.

Rewrite (1)

M=2*J-B

Sub into (2)

2*J-B=8+B

Solve for B

2B+8=2J or B+4=J

Sub J into (3)

2B + 4 = 20

B = 8

J = 12

M=16

1 answer


#include<stdio.h>

#include<conio.h>

void main()

{

int i=0,b,a,j;

clrscr();

while(i<=100)

{

printf("Enter the no:");

scanf("%d",&a);

b=a/2;

for(j=2;j<b;j++)

{

if(a%j==0)

break;

}

if (j==b)

i++

getch();

}

1 answer


Still have questions?
magnify glass
imp

import java.io.*;

import java.math.*;

public class addmatrices

{

public static void main(String args[])

{

int a[][]={{2,3},{4,5}};

int b[][]={{3,4},{5,2}};

int c[][]={{0,0},{0,0}};

int i,j;

System.out.println("matrix A:")

for(i=0;i<2;i++)

{

for(j=0;j<2;j++)

{

System.out.println(""+a[i][j]);

}

System.out.println();

}

System.out.println("matrix B:");

for(i=0;i<2;i++)

{

for(j=0;j<2;j++)

{

System.out.println(""+b[i][j]);

}

System.out.println();

}

System.out.println("Add Two Matrices");

for(i=0;i<2;i++)

{

for(j=0;j<2;j++)

{

c[i][j]=a[i][j]+b[i][j];

System.out.println(""+c[i][j]);

}

System.out.println();

}

}

}

1 answer


/* multiplication of a 3*3 matrix*/

#include<stdio.h>

main()

{

int a[3][3],b[3][3],c[3][3];

int i,j,k;

printf("enter the elements in A matrix:\n");

for(i=0;i<=2;i++)

{

for(j=0;j<=2;j++)

{

scanf("%d",&a[i][j]);

}

}

printf("enter b matrix:\n");

for(i=0;i<=2;i++)

{

for(j=0;j<=2;j++)

{

scanf("%d",&b[i][j]);

}

}

for(i=0;i<=2;i++)

{

printf("\n");

for(j=0;j<=2;j++)

{

c[i][j]=0;

for(k=0;k<=2;k++)

{

c[i][j] = c[i][j]+a[i][k] * b[k][j];

}

}

}

printf("multiplication matrix is:\n");

for(i=0;i<=2;i++)

{

for(j=0;j<=2;j++)

{

printf("%d\t",c[i][j]);

}

printf("\n");

}

}

1 answer


  1. Matrix-Addition(a,b)
  2. 1 for i =1 to rows [a]
  3. 2 for j =1 to columns[a]
  4. 3 Input a[i,j];
  5. 4 Input b[i,j];
  6. 5 C[i, j] = A[i, j] + B[i, j];
  7. 6 Display C[i,j];

1 answer


#include<stdio.h>

#include<conio.h>

int main(void)

{

int a[100][100]={0}; /* initializing matrices to '0' */

int b[100][100]={0};

int c[100][100]={0}; /*matrix-c for multiplication*/

/*r1,c1 are rows and coloumns for matrix-a.r2,c2 for matrix-b.*/

int r1,c1,r2,c2;

int i,j,k;

clrscr();

printf("enter the no of ROWS and COLOUMNS for MATRIX-A\n");

scanf("%d %d",&r1,&c1);

printf("enter the no of ROWS and COLOUMNS for MATRIX-B\n");

scanf("%d %d",&r2,&c2);

if(c1==r2)

{

printf("matrix multiplication possible\n\nenter numbers in MATRIX-A\n");

/* to enter numbers in matrix-a*/

for(i=0;i<r1;i++)

for(j=0;j<c1;j++)

scanf("%d",&a[i][j]);

printf("enter numbers in MATRIX-B\n");

/* to enter numbers in matrix-b*/

for(i=0;i<r2;i++)

for(j=0;j<c2;j++)

scanf("%d",&b[i][j]);

/*for matrices multiplication*/

for(i=0;i<r1;i++)

for(j=0;j<c2;j++)

for(k=0;k<c1;k++)

*(*(c+i)+j)+=*(*(a+i)+j)*(*(*(b+k)+j));

printf("result of multiplication of matrices is \n");

/*to display as matrix format*/

for(i=0;j<r1;i++)

{

printf("\n");

for(j=0;j<c2;j++)

printf("%d\t",*(*(c+i)+j));

}

} //if

else

printf("MATRIX multiplication not Possible\n");

getch();

return 0;

}

/* TWINKLING TWINS */

2 answers


No. Title Lyrics Music Length

1. "Introduction to Cardiology" Benji Madden B. Madden 0:47

2. "Let the Music Play" B. Madden, Joel Madden, Don Gilmore B. Madden 4:12

3. "Counting the Days" B. Madden, J. Madden B. Madden, John Feldmann 2:51

4. "Silver Screen Romance" B. Madden, J. Madden, Gilmore B. Madden 3:10

5. "Like It's Her Birthday" B. Madden, J. Madden, Gilmore B. Madden 3:30

6. "Last Night" B. Madden, J. Madden, Gilmore B. Madden, Gilmore 3:40

7. "Sex on the Radio" B. Madden, J. Madden, Sam Hollander, Dave Katz B. Madden 3:16

8. "Alive" B. Madden, J. Madden, Gilmore B. Madden 3:14

9. "Standing Ovation" B. Madden, J. Madden, Feldmann B. Madden, Feldmann 3:39

10. "Harlow's Song (Can't Dream Without You)" J. Madden, B. Madden, Luke Walker J. Madden 3:34

11. "Interlude: The Fifth Chamber" B. Madden, J. Madden, Gilmore 1:29

12. "1979" B. Madden, J. Madden B. Madden, Matt Squire 2:59

13. "There She Goes" B. Madden, J. Madden, Noel Fisher B. Madden, Fisher 3:22

14. "Right Where I Belong" B. Madden, J. Madden B. Madden, Squire 3:52

15. "Cardiology" B. Madden, J. Madden, Walker B. Madden 2:56

1 answer


Let Joe's amount be represented as ( J ) and Bill's amount as ( B ). According to the problem, ( B = \frac{1}{2}J ) and ( B + J = 60 ). Substituting the first equation into the second gives ( \frac{1}{2}J + J = 60 ), which simplifies to ( \frac{3}{2}J = 60 ). Solving for ( J ) gives ( J = 40 ), and substituting back, ( B = \frac{1}{2} \times 40 = 20 ). Therefore, Bill has 20 dollars.

1 answer


B. J. Surhoff debuted on April 8, 1987, playing for the Milwaukee Brewers at County Stadium; he played his final game on October 2, 2005, playing for the Baltimore Orioles at Oriole Park at Camden Yards.

1 answer


B. J. Upton debuted on August 2, 2004, playing for the Tampa Bay Devil Rays at Tropicana Field; he played his final game on September 29, 2013, playing for the Atlanta Braves at Turner Field.

1 answer


Although it is set in 1912, Priestley wrote the play in 1945

2 answers


#include<stdio.h>

int main(){

int a[2][2],b[2][2],c[2][2],i,j;

int m1,m2,m3,m4,m5,m6,m7;

printf("Enter the 4 elements of first matrix: ");

for(i=0;i<2;i++)

for(j=0;j<2;j++)

scanf("%d",&a[i][j]);

printf("Enter the 4 elements of second matrix: ");

for(i=0;i<2;i++)

for(j=0;j<2;j++)

scanf("%d",&b[i][j]);

printf("\nThe first matrix is\n");

for(i=0;i<2;i++){

printf("\n");

for(j=0;j<2;j++)

printf("%d\t",a[i][j]);

}

printf("\nThe second matrix is\n");

for(i=0;i<2;i++){

printf("\n");

for(j=0;j<2;j++)

printf("%d\t",b[i][j]);

}

m1= (a[0][0] + a[1][1])*(b[0][0]+b[1][1]);

m2= (a[1][0]+a[1][1])*b[0][0];

m3= a[0][0]*(b[0][1]-b[1][1]);

m4= a[1][1]*(b[1][0]-b[0][0]);

m5= (a[0][0]+a[0][1])*b[1][1];

m6= (a[1][0]-a[0][0])*(b[0][0]+b[0][1]);

m7= (a[0][1]-a[1][1])*(b[1][0]+b[1][1]);

c[0][0]=m1+m4-m5+m7;

c[0][1]=m3+m5;

c[1][0]=m2+m4;

c[1][1]=m1-m2+m3+m6;

printf("\nAfter multiplication using \n");

for(i=0;i<2;i++){

printf("\n");

for(j=0;j<2;j++)

printf("%d\t",c[i][j]);

}

return 0;

}

Sample output:

Enter the 4 elements of first matrix: 1

2

3

4

Enter the 4 elements of second matrix: 5

6

7

8

The first matrix is

1 2

3 4

The second matrix is

5 6

7 8

After multiplication using

19 22

43 50

1 answer


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

1 answer


B. J. Edwards was born in 1838.

2 answers


Conversion of a Regular Expression to NFA Algorithm Source code C programmingCS342 Compiler Lab Source code Algorithm C Programming

#include

#include

void main()

{

char reg[20];

int q[20][3],i,j,len,a,b;

clrscr();

for(a=0;a<20;a++)

{

for(b=0;b<3;b++)

{

q[a][b]=0;

}

}

printf("Regular expression: \n");

scanf("%s",reg);

len=strlen(reg);

i=0;

j=1;

while(i

{

if(reg[i]=='a'&®[i+1]!='/'&®[i+1]!='*')

{

q[j][0]=j+1;

j++;

}

if(reg[i]=='b'&®[i+1]!='/'&®[i+1]!='*')

{

q[j][1]=j+1;

j++;

}

if(reg[i]=='e'&®[i+1]!='/'&®[i+1]!='*')

{

q[j][2]=j+1;

j++;

}

if(reg[i]=='a'&®[i+1]=='/'&®[i+2]=='b')

{

q[j][2]=((j+1)*10)+(j+3);

j++;

q[j][0]=j+1;

j++;

q[j][2]=j+3;

j++;

q[j][1]=j+1;

j++;

q[j][2]=j+1;

j++;

i=i+2;

}

if(reg[i]=='b'&®[i+1]=='/'&®[i+2]=='a')

{

q[j][2]=((j+1)*10)+(j+3);

j++;

q[j][1]=j+1;

j++;

q[j][2]=j+3;

j++;

q[j][0]=j+1;

j++;

q[j][2]=j+1;

j++;

i=i+2;

}

if(reg[i]=='a'&®[i+1]=='*')

{

q[j][2]=((j+1)*10)+(j+3);

j++;

q[j][0]=j+1;

j++;

q[j][2]=((j+1)*10)+(j-1);

j++;

}

if(reg[i]=='b'&®[i+1]=='*')

{

q[j][2]=((j+1)*10)+(j+3);

j++;

q[j][1]=j+1;

j++;

q[j][2]=((j+1)*10)+(j-1);

j++;

}

if(reg[i]==')'&®[i+1]=='*')

{

q[0][2]=((j+1)*10)+1;

q[j][2]=((j+1)*10)+1;

j++;

}

i++;

}

printf("Transition function \n");

for(i=0;i<=j;i++)

{

if(q[i][0]!=0)

printf("\n q[%d,a]-->%d",i,q[i][0]);

if(q[i][1]!=0)

printf("\n q[%d,b]-->%d",i,q[i][1]);

if(q[i][2]!=0)

{

if(q[i][2]<10)

printf("\n q[%d,e]-->%d",i,q[i][2]);

else

printf("\n q[%d,e]-->%d & %d",i,q[i][2]/10,q[i][2]%10);

}

}

getch();

}

4 answers


B. J. Clarke has written:

'The Godhead'

2 answers


Only 2 of the 50 states begin with B, E, J or K. Therefore 4% of the states begin with B, E, J or K. The states are as follows:

· Kansas

· Kentucky

2 answers



Hold [Shift] and type [J][M][T][B][0][2]

2 answers


B-J- and the Bear - 1978 Fly a Wild Horse 2-11 was released on:

USA: 8 December 1979

1 answer


B-J- and the Bear - 1978 The Friendly Double Cross 2-21 was released on:

USA: 29 March 1980

1 answer


B-J- and the Bear - 1978 Cain's Son-in-Law 2-5 was released on:

USA: 27 October 1979

1 answer


B-J- and the Bear - 1978 Through the Past Darkly 2-15 was released on:

USA: 26 January 1980

1 answer


A.) j(a) = a^2 - 2a + 4

B.) j(3) = (3)^2 - 2(3) + 4 = 9 - 6 + 4 = 7

C.) j(x^2) = (x^2)^2 - 2(x^2) + 4 = x^4 - 2x^3 + 4

D.) j(x+3) = (x + 3)^2 - 2(x + 3) + 4 = x^2 +6x + 9 - 2x - 6 + 4 = x^2 + 4x + 7

E.) j(x+h) = (x + h)^2 - 2(x + h) + 4 = x^2 + 2hx + h^2 - 2x - 2h + 4

1 answer


A.) j(a) = a^2 - 2a + 4

B.) j(3) = (3)^2 - 2(3) + 4 = 9 - 6 + 4 = 7

C.) j(x^2) = (x^2)^2 - 2(x^2) + 4 = x^4 - 2x^3 + 4

D.) j(x+3) = (x + 3)^2 - 2(x + 3) + 4 = x^2 +6x + 9 - 2x - 6 + 4 = x^2 + 4x + 7

E.) j(x+h) = (x + h)^2 - 2(x + h) + 4 = x^2 + 2hx + h^2 - 2x - 2h + 4

1 answer


Yes. J. B. Priestley was a novelist.

1 answer


J. B. Morton was born in 1893.

1 answer


J. B. Morton died in 1979.

1 answer


B. J. Cohen was born in 1975.

1 answer


B. J. Kennedy died in 2003.

1 answer


J. B. Fuselier died in 1976.

1 answer


B. J. Widick was born in 1910.

1 answer


B. J. Widick died in 2008.

1 answer


J. B. Black died in 1964.

1 answer


J. B. Black was born in 1883.

1 answer


J. B. Thompson died in 1877.

1 answer


J. B. Thompson was born in 1829.

1 answer


B. J. Palmer was born in 1881.

1 answer


J. B. Jackson died in 1996.

1 answer


J. B. Jackson was born in 1909.

1 answer


B. J. Garbe was born in 1981.

1 answer


J. B. Fagan was born in 1873.

1 answer


J. B. Fagan died in 1933.

1 answer


B. J. Choubey died in 2008.

1 answer


B. J. Choubey was born in 1934.

1 answer


J. B. White ended in 1998.

1 answer


J. B. White was created in 1874.

1 answer


J. B. Malone died in 1989.

1 answer