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;

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!