diff --git a/Order Of Programs.md b/Order Of Programs.md index 221fab7..76ae0d8 100644 --- a/Order Of Programs.md +++ b/Order Of Programs.md @@ -11,4 +11,5 @@ |9 | DataTypeSize.c | DataTypeSize.exe | WAP to check size of following data types: char,int,float, double | |10 | BitwiseOperators.c | BitwiseOperators.exe | WAP to perform bitwise operators | |11 | LogicalOperator.c | LogicalOperator.exe | WAP for logical operators | -|12 | SolveExpression2.c | SolveExpression2.exe | WAP to solve given expression "ans=a + b - (c*d) / f + g" | \ No newline at end of file +|12 | SolveExpression2.c | SolveExpression2.exe | WAP to solve given expression "ans=a + b - (c*d) / f + g" | +|13 | SolveExpression3.c | SolveExpression3.exe | WAP to solve given expression "ans=a + b - (c*d) / f + g" | \ No newline at end of file diff --git a/SolveExpression3.c b/SolveExpression3.c new file mode 100644 index 0000000..c6c8bc3 --- /dev/null +++ b/SolveExpression3.c @@ -0,0 +1,15 @@ +// WAP to solve given expression. +// ans = a / (a+b) - [ d * e / (f*g)] + + +void main() { + int a, b, e, d, f, g, ans; + printf("Enter the value of a & b\n"); + scanf("%d,%d", &a, &b); + printf("\nEnter the value of e & d\n"); + scanf("%d,%d", &e, &d); + printf("\nEnter the value of f & g\n"); + scanf("%d,%d", &f, &g); + ans == a / (a+b) - (d * e / (f*g)); + printf("\n The answer to a / (a+b) - [ d * e / (f*g)] = %d", ans); +} diff --git a/SolveExpression3.exe b/SolveExpression3.exe new file mode 100644 index 0000000..6179e0f Binary files /dev/null and b/SolveExpression3.exe differ