Logo 
Search:

C Programming Articles

Submit Article
Home » Articles » C Programming » Homework HelpRSS Feeds

Illustrations of evaluation of expressions

Posted By: Adela Fischer     Category: C Programming     Views: 6876

Illustrations of evaluation of expressions.

Code for Illustrations of evaluation of expressions in C Programming

main()                                                      
   {
       float  a, b, c, x, y, z;                                
                                                               
       a = 9;                                                  
       b = 12;                                                 
       c = 3;                                                  
                                                               
       x = a - b / 3 + c * 2 - 1;                              
       y = a - b / (3 + c) * (2 - 1);                          
       z = a -(b / (3 + c) * 2) - 1;                           
                                                               
       printf("x = %f\n", x);                                  
       printf("y = %f\n", y);                                  
       printf("z = %f\n", z);                                  
   }
                                                           
                                                               
Output                                                      
                                                               
   x = 10.000000                                               
   y = 7.000000                                                
   z = 4.000000    
  
Share: 


Didn't find what you were looking for? Find more on Illustrations of evaluation of expressions Or get search suggestion and latest updates.

Adela Fischer
Adela Fischer author of Illustrations of evaluation of expressions is from Frankfurt, Germany.
 
View All Articles

 
Please enter your Comment

  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].

 
No Comment Found, Be the First to post comment!