Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
lab pro v.05
//gcc 5.4.0 //We would like implement a C program that reads an input a year and checks if it is a leap year. //Design an algorithm that checks whether a year is a leap year. A leap year: //The year is evenly divisible by 4; //If it can be evenly divided by 100, it is NOT a leap year, unless it is also evenly divisible by 400. Then it is a leap year. //Write a C program that implements your algorithm. (Due next lab). #include <stdio.h> int main(void) { *{Start Program int input; int a; a=4; int b; c=100; int c; c=400 double ar; double br; double cr; READ input; ar=input%a; br=input%b; If ar=0 THEN; printf("%d is a leap year!",input); ElSE }* }
run
|
edit
|
history
|
help
0
Assignment 4
pruebapi2
a3 commented
18BCE2182 ASSESS_1 Q1-7
Square pyramid
A_141117_Euclides
linkedlist
Project v0.07
18BCE2182 ASSESS_1 Q1-5
CS HW2