#include <stdio.h>
int main() {
int year;
printf("Enter a year: ");
scanf("%d", &year);
// leap year if perfectly divisible by 400
if (year % 400 == 0) {
printf("%d is a leap year.", year);
}
// not a leap year if divisible by 100
// but not divisible by 400
else if (year % 100 == 0) {
printf("%d is not a leap year.", year);
}
// leap year if not divisible by 100
// but divisible by 4
else if (year % 4 == 0) {
printf("%d is a leap year.", year);
}
// all other years are not leap years
else {
printf("%d is not a leap year.", year);
}
return 0;
}
Friday, 9 July 2021
leap year coding
Book Review
TITLE OF BOOK: Introduction to Ethics
AUTHOR: Reginald M.J. Oduor
This book is a product of more than a decade of Oduor’s experience in teaching ethics
(moral philosophy) at the University of Nairobi. In the course of this introduction, the
reader gets to see the techniques of philosophic reflection in action, as they are
employed to scrutinise various pertinent moral questions.
Chapter 1 sets forth the main components of Oduor’s approach. He presents morality
as a tool for the promotion of social harmony. In this regard, he points out that since
actions emanating from any individual or social institution affects other individuals
and social institutions, there is need to regulate such action. In the author’s view,
moral philosophy proceeds from five assumptions about the human person, namely,
that he/she is self-conscious (aware of his/her uniqueness), social (at his/her best
when he/she interacts with fellow human beings), rational (able to provide grounds
for his/her claims), creative (capable of coming up with new ways of performing old
tasks), and moral (able to distinguish right action from wrong action, and virtuous
[11:40, 10/07/2021] Jozef: character from vicious character). The author then introduces his readers to the four
main approaches to the study of morality, namely, descriptive ethics (which is the
province of the social sciences), normative ethics, meta-ethics and applied ethics.
POEM
Signs of Fall
When summer is departing
and fall is arriving,
the wind whips through the trees
and spooks the cat.
The leaves consider
wearing bold new colors.
In the corner of my room
my mother builds a pile
of new notebooks and pencils and paper.
And when I bike past the school,
I start hoping my new teacher
isn’t too strict
and that my friends and I
are all assigned to the same class.
Electricity economy

