write a c++ code of diagonal matrix.

Answer Posted / md.ekramul kabir

#include<stdio.h>


void main(void)
{
int row=0,column=0;

int data[4][4];

for(row=0;row<=3;row++)
{

for(column=0;column<=3;column++)
{

scanf("%d",&data[row][column]);
}
}



printf("\nYour Matrix is : \n");


for(row=0;row<=3;row++)
{

for(column=0;column<=3;column++)
{

printf("%d\t",data[row][column]);
}

printf("\n");
}

}

Is This Answer Correct ?    13 Yes 30 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is inheritance and how many types of inheritance?

623


What is byval and byref? What are differences between them?

1692


What is debug class?what is trace class? What differences are between them? With examples.

1612


assume the program must insert 4 elements from the key board and then do the following programs.sequential search(search one of the elements),using insertion sort(sort the element) and using selection sort(sort the element).

1672


What is oops with example?

566






What is inheritance in oop?

605


What is protected in oop?

605


write a C++ program for booking using constructor and destructor.

2055


when to use 'mutable' keyword and when to use 'const cast' in c++

1651


just right the logic of it 1--> If few people are electing then every time ur candidate should win 2--> arrange books in box, if box carry weight == books weight then take another box..... find the no of box required.

6489


What is the diamond problem in inheritance?

580


What are properties in oop?

613


Can a destructor be called directly?

607


Get me a number puzzle game-program

1696


How to hide the base class functionality in Inheritance?

640