Dora is very much interested in gardening and she decides to plant more trees in her garden. She plants trees in the order of rows and columns. She numbered the trees in column wise order. She planted the mango trees only in the second column from both first and last. But later when the trees grew up, she forgot where she planted mango trees. So help her find out whether the given tree number is a number of mango trees or not. Display whether “It is a mango tree” or “It is not a mango tree”.
Answers
Answer: The required code for the above based question is listed below:
#include<iostream>
using namespace std;
int main()
{
int a,b,c;
std::cin>>a>>b>>c;
if(a+b==c || (a+b)*2==c)
std::cout<<"It is a mango tree";
else
std::cout<<"It is not a mango tree";
}
Explanation:
Answer:
C programming language exists a machine-independent programming language that exists mostly utilized to make numerous kinds of applications and operating systems such as Windows, and other complicated programs such as the Oracle database, Git, Python interpreter, and games.
Explanation:
#include<iostream>
using namespace std;
int main()
{
int a,b,c;
std::cin>>a>>b>>c;
if(a+b==c || (a+b)*2==c)
std::cout<<"It is a mango tree";
else
std::cout<<"It is not a mango tree";
}
#SPJ3