Download presentation
Presentation is loading. Please wait.
Published byGertrude Bathsheba Norman Modified over 9 years ago
1
Programación en Lenguaje C COIS 115 Profesor: Gustavo Velez
2
Taller Tres COIS 115 Profesor: Gustavo Velez
3
Ejercicio Asignación Buscar el promedio de tres números –Definir variables Num1, num2 y num3 Avg –Entrar valores –Calcular promedio –Enseñar promedio
4
If statement
5
If statement - Example //calculate gross pay if (hours > 40) gross = hours * rate + (hours - 40) * rate / 2; else gross = hours * rate; //end if if (current > 0 && previous > 0 && current >= previous) { //calculate gallons used and water charge calculate(current, previous, RATE, gallons, charge); //display water bill displayBill(name, gallons, charge); } else Console::WriteLine("Input Error"); //end if
6
Ejercicio Payroll problem –To pay 1.5 times if the employee work over 40 hours
7
Ejercicio Sales Bonus –Sales upto $12,000, pay 12% of the sales –Over $12,000, pay 15% of the sales over $12,000
8
While statement
9
While statement - Example
10
Preguntas
11
Check-out +(Positive)∆ (Change) ---------------------------!----------------------------
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.