Skip to content

Commit 6ba9158

Browse files
authored
_3.ExpressionEvaluation.c
code to evaluate the arithmetic expression((a-b/c*d+e)*(f+g)) added
1 parent e508873 commit 6ba9158

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

_3.ExpressionEvaluation.c

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/*Program to evaluate the arithmetic expression((a-b/c*d+e)*(f+g)) */
2+
#include<stdio.h>
3+
int main() {
4+
float a,b,c,d,e,f,g,s; //Variable declaration
5+
printf("Enter the values of a\n");
6+
scanf("%f",&a);//Input value of a
7+
printf("Enter the values of b\n");
8+
scanf("%f",&b);//Input value of b
9+
printf("Enter the values of c\n");
10+
scanf("%f",&c);//Input value of c
11+
printf("Enter the values of d\n");
12+
scanf("%f",&d);//Input value of d
13+
printf("Enter the values of e\n");
14+
scanf("%f",&e);//Input value of e
15+
printf("Enter the values of f\n");
16+
scanf("%f",&f);//Input value of f
17+
printf("Enter the values of g\n");
18+
scanf("%f",&g);//Input value of g
19+
s=((a-b/c*d+e)*(f+g));//Evaluate the expression
20+
printf("\n The Solution of the expression is=%f",s);
21+
return(0);
22+
}

0 commit comments

Comments
 (0)