Answer:
Check the explanation
Explanation:
#include <bits/stdc++.h>
using namespace std;
class Rectangle{
public:
int length;
int breadth;
Rectangle(int l,int b){
length = l;
breadth = b;
}
int area(){
return length*breadth;
}
int perimeter(){
return 2*(length+breadth);
}
bool equals(Rectangle* r){
// They have the exact same length and width.
if (r->length == length && r->breadth == breadth)
return true;
// They have the same area
if (r->area() == area())
return true;
// They have the same perimeter
if (r->perimeter() == perimeter())
return true;
// They have the same shape-that is, they are similar.
if (r->length/length == r->breadth/breadth)
return true;
return false;
}
};
int main(){
Rectangle *r_1 = new Rectangle(6,3);
Rectangle *r_2 = new Rectangle(3,6);
cout << r_1->equals(r_2) << endl;
return 0;
}
Answer:
#include <iostream>
using namespace std;
int main() {
int a[4][5];//declaring a matrix of 4 rows and 5 columns.
for(int i=0;i<4;i++)
{
for(int j=0;j<5;j++)
{
if(i==3)//initializing last row as 0.
{
a[i][j]=0;
}
else//initializing last row as 1.
{
a[i][j]=1;
}
}
}
for(int i=0;i<4;i++)
{
for(int j=0;j<5;j++)
cout<<a[i][j]<<" ";//printing the matrix.
cout<<endl;
}
return 0;
}
Output:-
1 1 1 1 1
1 1 1 1 1
1 1 1 1 1
0 0 0 0 0
Explanation:
I have created a matrix of size 4 rows and 5 columns.I have used for loops to fill the array.To fill the last row with 0 i have used if statement.else we are filling it with 1.
You could Factory Reset a computer or you could smash it with a hammer
Read view
It allows to hide all instrument panels
Answer:
i think its slideshow tab
Explanation:
tell me if im right