🔒 Closed C languages

Status
Not open for further replies.

Ph_Bunker

Forum Veteran
Ka pH ano po mali pa correction naman po error po kasi

#include <stdio.h>
#include <conio.h>

main()
{
}
getGradingPeriod(int period){
}
if (period==1) {
printf("Prelim: ");
}
else if (period==2) {
printf("Mid-Term: ");
}
else if (period==2) {
printf("Semi Finals: ");
}
else if (period==3) {
printf("Finals: ");
}
}

void getSubjects(int i) {
}
if (i==1) {
printf("ENG");
}
else if (i==2) {
printf("FIL");
}
else if (i==3) {
printf("MTH");
}
else if (i==4) {
printf("PE");
}
else if (i==5) {
printf("CS111");
}
}

int main(){
double total = 0, grade = 0;
int period = 1;
do {
printf("Enter 5 Subject Grade in: ");
getGradingPeriod(period);
printf("\n");
for (int i=0;i<5;i++){
getSubjects(i);
cin >> grade;
total = total + grade;
}
printf (total)(" Total in ");
getGradingPeriod(period);
("\n");
printf (total/5)(" Average in ");
getGradingPeriod(period);
printf("\n");
printf(total/5)()" Percentage in ");
getGradingPeriod(period);
printf("\n");

if ((total/5) >= 75 ) {
printf("You PASSED in ");
}
else {
printf("You FAILED in ");
}
getGradingPeriod(period);
printf("\n");
total = 0;
period++;
}while(period<4);
return 0;
}
 
Status
Not open for further replies.

About this Thread

  • 3
    Replies
  • 532
    Views
  • 3
    Participants
Last reply from:
Romesky

Trending Topics

Online now

Members online
1,081
Guests online
990
Total visitors
2,071

Forum statistics

Threads
2,274,856
Posts
28,958,885
Members
1,233,461
Latest member
Kdgwapo
Back
Top