EXP04
EXP04
Course Code:EEE105
Section:01
for (i=0;i<number_of_student;i++) {
printf("\nEnter Student ID:");
scanf("%d",&id);
printf("\nStudent ID:%d\n",id);
printf("Total Marks:%.2lf\n",total);
printf("Grade:%c\n",grade);
}
float highest=100,lowest=0;
float sum;
if (total <= highest){
printf("\nHighest Score: %0.2lf\n",total);
}
if(total >= lowest){
printf("\nLowest Score: %0.2lf\n",total);
}
sum=(total/number_of_student);
return 0;
}
Output:
Problem:02
#include<stdio.h>
int main(){
int frist_year,second_year,Leapyear;
frist:
printf("Enter the frist year:");
scanf("%d",&frist_year);
printf("Enter the second year:");
scanf("%d",&second_year);
if (frist_year>second_year){
printf("Error!\n");
goto frist;
}
printf("Leap year between these year are:\n");
for(Leapyear=frist_year;Leapyear<=second_year;Leapyear++){
if((Leapyear%4)==0||(Leapyear%400)==0){
printf("%d\n",Leapyear);
}
return 0;
}
Output: