From the course: C Essential Training

Unlock the full course today

Join today to access over 22,500 courses taught by industry experts or purchase this course individually.

Challenge: Get the order correct

Challenge: Get the order correct - C Tutorial

From the course: C Essential Training

Start my 1-month free trial

Challenge: Get the order correct

(upbeat music) - [Instructor] Your challenge is to get the order correct in a C language mathematical expression. You've been hired as a programmer at a museum that's raised enough money to afford its own programmer. Your task is to write a program that calculates the total number of artifacts in the museum. Use the code from exercise file 03_06 challenge1 to get started. Here are the details. The museum has 12 rooms. Each room has 16 paintings and 4 sculptures. Write an equation that calculates the number of artifacts in the museum and outputs the result. I could offer a hint. The proper result is 240, not 196. This challenge should take you about 10 minutes to complete.

Contents