Respuesta :
Answer: Conditional statements are just true false statements
Explanation:
Let's say there's a kpop band burglarizing my house and I have a super AI that detects if a kpop band is my house through cameras. What it would do is change a variable "kpopBandInHouse = False" to True. I would then have an if statement next with a custom function:
if kpopBandInHouse == True:
nukeHouse()
So if the conditional statement is true, it nukes my house. It is false, it does not nuke my house.
Conditional statements let you make a choice depending on certain conditions. These results are defined by one set of conditional statements which contain boolean expressions which are evaluated to a correct or incorrect boolean value, and the further calculation can be defined as follows:
Program Explanation:
- Defining a header file.
- Defining the main method.
- Defining an integer variable "n" that initializes the value that is "1".
- Defining a conditional statement that checks "n equal to 1", when it's true it will print the message.
Program:
#include <iostream>//header file
using namespace std;
int main()//main method
{
int n=1;//defining integer variable n that initlize the value 1
if(n==1)//defining if block that checks n value equal to 1
{
cout<<"Hello World";//print message
}
return 0;
}
Output:
Please find the attached file.
Learn more:
brainly.com/question/10714086
