Skip to main content

Section 4.3 Practice: Simple Calculations

Check Your Understanding Check Your Understanding

1.

Please complete the code below so that it prints the following computation to the screen:
5*8+2*8 = (5+2)*8 = 56

Compile and run the code below in your own C environment.

#include <stdio.h>

int main(void) {
    /* Please complete the following line of code: */

    printf("%d*8 + %d*8 = (%d+%d)*8 = %d\n", );

    return(0);
}
When your program performs correctly you’ll be given a keyword to enter in Canvas. Please enter the keyword exactly as given to you (without the quotation marks).