21 lines
433 B
C
21 lines
433 B
C
// WAP to solve given expression.
|
|
// ans=a + b - (c*d) / f + g
|
|
|
|
void main() {
|
|
int a, b, c, d, f, g, ans;
|
|
|
|
printf("Enter the value of a & b\n");
|
|
scanf("%d,%d", &a, &b);
|
|
|
|
printf("\nEnter the value of c & d\n");
|
|
scanf("%d,%d", &c, &d);
|
|
|
|
printf("\nEnter the value of f & g\n");
|
|
scanf("%d,%d", &f, &g);
|
|
|
|
ans == a + b - (c*d) / f + g;
|
|
|
|
printf("\n The answer to a + b - (c*d) / f + g = %d", ans);
|
|
}
|
|
|