Aula Algoritmos em C 14 -Exercícios com IF-ELSE na linguagem C

Example 1. A market is running a promotion to sell avocados. Buying up to 12 avocados, the unit price is R$1.00. If the customer buys more than 12 avocados and up to 25 avocados, the unit price drops to R$0.90, and if the customer buys more than 25 units, each avocado costs R$0.75. Write a program that reads the total number of avocados purchased and displays the value at the end of the execution. Example 2. Write an algorithm to determine a person's ideal weight. The input is height and sex (coded as follows: F=female and M=male). Formulas: For men: (72.7 * Height) – 58 For women: (62.1 * Height) – 44.7 Code: github.com/fpuntel @fpuntel