Professional Documents
Culture Documents
CSE-23078 - DSE - 163 - Assignment 4
CSE-23078 - DSE - 163 - Assignment 4
Assignment 4
1.
a. Write a C program to read the number of holidays in each month in Sri
Lanka and find the month which has the minimum number of holidays
and the month which has the maximum number of holidays.
#include <stdio.h>
int main() {
int holidays[12];
char *months[12] = {
"January", "February", "March", "April",
"May", "June", "July", "August",
"September", "October", "November", "December"
};
#include <stdio.h>
int main() {
float fahrenheit, celsius;
return 0;
}
2. Write a C program to read the radius of a circle and display the area and the
circumference of that circle.
A = (22/7)* r * r where A = Area of the circle; r = radius of the
circle. C = 2*(22/7)*r where C = Circumference of the circle; r = radius of the
circle.
#include <stdio.h>
int main() {
float radius, area, circumference;
const float pi = 3.14159;
circumference = 2 * pi * radius;
return 0;
}