Computer Science, asked by tanish25700691, 1 year ago

Evaluate the following C++ expressions where a,b,c are integer and d,f are floating point number. The value of a=5,b=3,and d=15
i.F=a+b/a
ii.C=d*a+b
iii.C=(a++)*d+a
iv.f=(++b)*b-a
v.c=a-(b++)*(--a)

Answers

Answered by Anonymous
35
F= 5+3 /5=1.6f
C=15*8= 120
C=5*15+5 = 80
f =4*8= 32f
c= 5-3*4=6
Answered by franktheruler
1

Answer:

#include < iostream >

using namespace std;

int main ( )

{

int a, b, c ;

float d, f, C, C1, F ;

cout << " Enter three integers " ;

cin >> a >> b >> c ;

cout << " enter the value of d and f " ;

cin >> d >> f ;

F = ( a + b ) / a ;

cout << " value of F is : " << F << endl ;

C = ( d * a ) + b ;

cout << " value of C is : " << C << endl ;

C1 = ( a++ ) * d + a ;

cout << " value of C1 is : " << C1 << endl ;

f = ( ++ b ) * b -a ;

cout << " value of f is : " << f << endl ;

c = a - ( b++ ) * ( --a ) ;

return 0 ;

}

Similar questions