The document provides information about statements, expressions, operators, and an example C program to calculate weekly employee pay. It defines a statement as a specification for the computer to execute, and expressions as a combination of operators and operands. Operators act on operands and are divided into unary, binary, and ternary. Several statements grouped in braces are called compound statements. It gives examples of arithmetic, relational, and logical operators, and provides a 3 part C program to read employee data, calculate regular and overtime pay, and display the results.
Python Advanced Programming: The Guide to Learn Python Programming. Reference with Exercises and Samples About Dynamical Programming, Multithreading, Multiprocessing, Debugging, Testing and More
The document provides information about statements, expressions, operators, and an example C program to calculate weekly employee pay. It defines a statement as a specification for the computer to execute, and expressions as a combination of operators and operands. Operators act on operands and are divided into unary, binary, and ternary. Several statements grouped in braces are called compound statements. It gives examples of arithmetic, relational, and logical operators, and provides a 3 part C program to read employee data, calculate regular and overtime pay, and display the results.
The document provides information about statements, expressions, operators, and an example C program to calculate weekly employee pay. It defines a statement as a specification for the computer to execute, and expressions as a combination of operators and operands. Operators act on operands and are divided into unary, binary, and ternary. Several statements grouped in braces are called compound statements. It gives examples of arithmetic, relational, and logical operators, and provides a 3 part C program to read employee data, calculate regular and overtime pay, and display the results.
The document provides information about statements, expressions, operators, and an example C program to calculate weekly employee pay. It defines a statement as a specification for the computer to execute, and expressions as a combination of operators and operands. Operators act on operands and are divided into unary, binary, and ternary. Several statements grouped in braces are called compound statements. It gives examples of arithmetic, relational, and logical operators, and provides a 3 part C program to read employee data, calculate regular and overtime pay, and display the results.
a) Statement is a ___specification_______to be taken by the computer as the
program executes. b) An Expression is a Combination of both __operators____and__operands_____. c) Operators act on___operands_____. d) Operators are divided into____unary____, ___binary_____ and ____ternary____. e) Several statements grouped together in braces ({ and }) are called a(n)______compound statements_____.
2. Give an example of Arithmetic Operator, Relational Operator and Logical Operator.
Subtraction ‘-‘, Greater than ‘>’, AND ‘&&’
3. Write a C program to calculate employee weekly pay. The program is required to
read the employee name, his total number of regular hours worked, total overtime hours and hourly wage rate. Weekly pay is calculated as payment for regular hours worked, plus payment for overtime hours worked. Payment for regular hours worked is calculated as (wage rate times regular hours worked); payment for overtime hours worked is calculated as (wage rate times overtime hours worked times 1.5). Display the employee name and his weekly pay on the screen.
Python Advanced Programming: The Guide to Learn Python Programming. Reference with Exercises and Samples About Dynamical Programming, Multithreading, Multiprocessing, Debugging, Testing and More