Electrical and Computer Engineering
3 of 48
UAH
CPE 112
Declarations for Numeric Types
•Named Constant Declarations
–const float PI = 3.14159;
–const float E = 2.71828;
–const int MAX_SCORE = 100;
–const int MIN_SCORE = -100;
•Variable Declarations
–int studentCount; // Number of students
–int sumOfScores; // Sum of their scores
–float average; // Average of the scores
•Appropriate Assignments
• average = 95.7;
• sumOfScores = 2478;
–