Write a expression that uses a relational operator to return true if the variable total is greater than or equal to final
Answers
Answered by
17
#include <stdio.h>
int main() {
int a,b,total,final;
a=5;
b=4;
total=a+b;
final=8;
if(total>=final){
return true;
}
else{
return false
}
}
In above code a+b add and store in total where relational expression is used in if statement where total is 9 and final is 8 so its true and if it fails then its false.
I hope you understand the code
int main() {
int a,b,total,final;
a=5;
b=4;
total=a+b;
final=8;
if(total>=final){
return true;
}
else{
return false
}
}
In above code a+b add and store in total where relational expression is used in if statement where total is 9 and final is 8 so its true and if it fails then its false.
I hope you understand the code
Similar questions
English,
8 months ago
Computer Science,
8 months ago
English,
8 months ago
Social Sciences,
1 year ago
Science,
1 year ago
Math,
1 year ago