EXPRESSIONS IN C
- ARITHMETIC EXPRESSIONS :
- EVALUATION OF EXPRESSIONS :
- Expressions are evaluated using an assignment statement of the form :
variable = expressions ;
- Expressions are evaluated using an assignment statement of the form :
X = A * B - C ;
Y = B / C * A;
#include <stdio.h>
int main()
{
float x, y, a, b;
a = 10;
b = 20;
x = (a * b) - (10 / b) ; // expression 1
y = b + (a * 30) / a ; // epression 2
printf(" x = %f /n",x);
printf(" y = %f ",y);
return 0;
}
output : x = 199.500000
y = 50.000000
output : x = 199.500000
y = 50.000000
No comments:
Post a Comment
If you have any query, please let me know