Question: Consder the following code segment: int numOfWeeks, /umber of weeks numOfDays; // number of days int totalDays = 60; //total number of days Write the
Consder the following code segment: int numOfWeeks, /umber of weeks numOfDays; // number of days int totalDays = 60; //total number of days Write the statements to convert the total number of days to weeks and days given below. Note: there are 7 days in one week. a) Calculate the number of weeks, and store the result in numOfWeeks. (2 marks) b) Calculate the remaining number of days, store the result in numOfDays, (2 marks)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
