Answer Posted / senthil.k,arasur
void main()
{
int a,b,c;
cout<<"Diagonal matrix";
for(a=1;a<=3;a++)
{
for(b=1;b<=3;b++)
{
c=1;
if(c==b)
{
cout<<c;
}
else
{
cout<<"0";
}
}
c++;
cout<<"\n";
}
}
output:
1 0 0
0 2 0
0 0 3
| Is This Answer Correct ? | 38 Yes | 52 No |
Post New Answer View All Answers
What is the problem with multiple inheritance?
What is static modifier?
What are the benefits of oop?
Advantage and disadvantage of routing in telecom sector
What is object-oriented programming? Webopedia definition
Whats is abstraction in oops?
What do you mean by overloading?
What is an example of genetic polymorphism?
Why is there no multiple inheritance?
What is overriding in oops?
What does it mean when someone says I oop?
Which language is not a true object oriented programming language?
What is the main purpose of inheritance law?
Why do we need oop?
What is purpose of inheritance?