Solution for Exercise 11-24

ex1124

#include <stdio.h>

int main()
{
    int result;

    result=(12-5)*2;
    printf("(12-5)*2=%d\n",result);
    return(0);
}

Notes

* By enclosing 12-5 in Line 7 in parentheses, that operation is performed first. The result is then multiplied by 2.