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 type of loop is a for loop?
How do you explain polymorphism?
What does and I oop mean in text?
How to hide the base class functionality in Inheritance?
write a program to find 2 power of a 5digit number with out using big int and exponent ?
What is polymorphism in oops with example?
what type of question are asked in thoughtworks pair programming round ?
What is variable example?
to find out the minimum of two integer number of two different classes using friend function
State what is encapsulation and friend function?
What does it mean when someone says I oop?
Which type does string inherit from?
hi, this is raju,iam studying b.tech 2nd year,iam want know about group1 and group2 details, and we can studying without going to any instutions? please help me.
What do you mean by abstraction?
What is this pointer in oop?