+ 6
How to determine wheter the output is conditions or values??
2 Answers
+ 8
To determine conditions,there should be have a boolean expression.
To determine the values, it should be have int,double,float & string
+ 3
Maybe I am missing something.... Output can be returned as the result of a condition being true or false. Now that output can be used in other conditions for further evaluation. Values or objects are used in evaluation of a condition... to determine what is the next step.
This is C# code...
int a = 5;
int b = 0;
if (a == 5) // this returns true so the statement below is executed
{
b = 1000;
Console.WriteLine(quot;You won {b} clams!");
}
else
{
Console.WriteLine("Sorry, tomorrow is Monday.");
}
bool condition = false; // this is set to false
condition = (b == 1000) ? true : false; //this is a test and because b is equal to 1000 from the above statements the condition evaluates to true and prints true
as there is the condition ? response if true or the response if false
Console.WriteLine(condition);
-----------------------------------------------
bool is also a value, but the data type returns either a value of true or false