Please write a simple program that performs calculation and, shows its result equals to '10'
** There is no restriction as long as the result indicates 10 from its calculation **
** However, your codes should NOT be the same as the given example **
Example
#include <stdio.h>
int main(){
int a, b, c, d;
scanf ("%d %d %d", &a, &b, &c);
d = a + b * c;
printf ("%d", d);
return 0;
}
Input
2 2 4
Output
2 2 4
10
Suggestion
- Try to apply Addition, Subtraction, Multiplication, Division in your codes
- Be advised that 'Order of Operation' is crucial. The relative precedence levels of operators found in many C-style languages are as follows