Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Draw flowgraphs and calculate the cyclomatic complexity, v(G) , essential complexity, ev(G) , module design complexity, iv(G) , system design complexity, S 0 , and

Draw flowgraphs and calculate the cyclomatic complexity, v(G), essential complexity, ev(G), module design complexity, iv(G), system design complexity, S0, and integration complexity, S1 for the software code below.

LABELS

PROGRAM LISTING

PROGRAM matsub

c

Product of two matrices

dimension a(10,10),b(10,10),c(10,10)

integer p,q

write(*,*)'To find the product of two matrices.'

write(*,*)'Enter the order of the first matrix:'

read(*,*)m,n

write(*,*)'Enter the order of the second matrix:'

read(*,*)p,q

IF(n.NE.p)THEN

write(*,*)'The matrices are not conformable for multiplication.'

STOP

ENDIF

call inpt(a,m,n)

call inpt(b,p,q)

call pro(a,b,c,m,n,q)

call outpt(c,m,q)

STOP

END

subroutine inpt(a,m,n)

dimension a(10,10)

write(*,10)m,n

10

format(1x,'Enter the matrix of order',I2,' *'I2,' :')

read(*,*)((a(i,j),j=1,n),i=1,m)

END

subroutine pro(a,b,c,m,n,q)

dimension a(10,10),b(10,10),c(10,10)

integer q

DO 20 i=1,m

DO 30 j=1,q

c(i,j)=0

DO 40 k=1,n

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

read(*,*)((a(i,j),j=1,n),i=1,m)

40

continue

30

continue

20

continue

END

subroutine outpt(c,m,q)

dimension c(10,10)

integer q

write(*,*)'The product matrix is: '

DO 50 i=1,m

DO 60 j=1,q

write(*,70)c(i,j)

70

format(3x,F6.2,4x\)

60

continue

write(*,*)

50

continue

END

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Principles Programming And Performance

Authors: Patrick O'Neil

1st Edition

1558603921, 978-1558603929

More Books

Students also viewed these Databases questions

Question

What lessons in intervention design, does this case represent?

Answered: 1 week ago

Question

How many Tables Will Base HCMSs typically have? Why?

Answered: 1 week ago

Question

What is the process of normalization?

Answered: 1 week ago