Write proper constant declarations for the following: (12%) (You have to pick me
ID: 3587290 • Letter: W
Question
Write proper constant declarations for the following: (12%) (You have to pick meaningful names,) a) An integer constant representing the number of weeks in a year b) A character constant representing the blank character c) A float constant representing the provincial sale tax rate. 4.00 on 2) Choose a meaningful name and write a variable declaration for each of the following values and initialize them to suit your situation. (You must pick an appropriate type for each variable.) (12%) a) A variable to hold the number of courses you are taking this term; b) A variable to hold your current GPA; c A variable to hold the number of credits you have completed so far;Explanation / Answer
1)
a) int numberOfWeeksInAnYear;
b) char aCharecter;
c) float salesTaxRate;
2)
a) int numberOfCourses = 10;
b) double GPA = 10.21;
c) int credits = 9;
1)
a) int numberOfWeeksInAnYear;
b) char aCharecter;
c) float salesTaxRate;
2)
a) int numberOfCourses = 10;
b) double GPA = 10.21;
c) int credits = 9;
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.