write a c++ code of diagonal matrix.
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / 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 |
write a program using c++ to implement single contiguous memory mangement techniques.display the content of the main memory after yhe allocation of jobs and percentage of the wastage of the main memory
What is coupling in oops?
Can we define a class within the interface?
In c++ there is only virtual destructors, no constructors. Why?
What is a class and object?
What is the difference between class and structure?
Hi friends I have experience of 6 months in website design and maintanence. Now i am looking for other IT jobs.. to switch platform. please post any interview you know in chennai.
What is class and object with example?
Finding of the 4 larger (bigger) numbers from the list like{1245,4587,2145,1163,29987,65783.....}
What is a scope resolution operator?
What is object in oop with example?
What is Hashing and how is it done? Pictorial form?