Programming Final
Programming Final
#include<stdio.h>
int main(){
int side1, side2, side3;
return 0;
}
#include<stdio.h>
int main(){
int marks;
char grade;
return 0;
}
#include<stdio.h>
int main()
{
int value;
float result;
printf("Enter the value : ");
scanf("%d",&value);
if(value>0)
{
if(value%2==0)
{
result = value * 5.0;
printf("Result = %.2f",result);
}
else
{
result = (float)value/5;
printf("Result = %.2f",result);
}
}
else
{
printf("Result = %d",value);
}
return 0;
}
Answer to the question no - 4
#include <stdio.h>
int main() {
int year = 2024;
int leap_year = 0;
if (year % 2 == 0) {
if (year % 4 == 0 && (year % 100 != 0 || year % 400 == 0)) {
leap_year = 1;
}
}