Skip to content

Instantly share code, notes, and snippets.

View surendra554's full-sized avatar

Surendra Kumar Patel surendra554

View GitHub Profile
@surendra554
surendra554 / Sleep debt source code Java
Last active September 25, 2022 12:26
// The user estimates how much they sleep on a weekday/weekend day. The equation assume you need 8 hours sleep of a night. The user in this case sleep hours on weekday and 9 hours on a weekend. //
int weekday = 5;
int weekend = 9;
int optimalHours = 7 * 8;
int actualHours = weekday;
actualHours = actualHours + weekend * 2;
int solution = optimalHours - actualHours;
display(solution);