Answers for "Number 10"

C
0

Number 10

#include <stdio.h>
int main() 
{ 
    int a = 30;  
    int b = 10;  
    int c = 15; 
    int d = 5; 
    int e;  
    e = (a + b) * c / d;
  
    // ( 30 * 15 ) / 5  
    printf("Value of (a + b) * c / d is : %d\n", e );  
    e = ((a + b) * c) / d; 
  
    // (30 * 15 ) / 5  
    printf("Value of ((a + b) * c) / d is : %d\n" , e ); 
    e = (a + b) * (c / d); 
  
   // (30) * (15/5)  
   printf("Value of (a + b) * (c / d) is : %d\n", e );  
   e = a + (b * c) / d;  
  
   // 30 + (150/5)  
   printf("Value of a + (b * c) / d is : %d\n" , e );  
   return 0;  
}
Posted by: Guest on March-03-2022

Code answers related to "C"

Browse Popular Code Answers by Language