THIS IS A C PROGRAM. I AM HAVING MULTIPLE ERRORS.
PLEASE ANSWER HOW CAN I FIX MY ERRORS, BRAINLIEST WILL BE MARKED
MY PROGRAM IS ABOUT CALCULATING AVERAGE AND PERCENATGE OF MARKS OF THREE SUBJECTS THROUGH A FUNCTION
#include
int main()
{
void averper(int,int,int,int,int,int);
int num1,num2,num3,aver,per,max;
printf("Enter the marks of subject 1: ");
scanf(" %d",&num1);
printf("Enter the marks of subject 1: ");
scanf(" %d",&num2);
printf("Enter the marks of subject 1: ");
scanf(" %d",&num3);
printf("Enter the maximmum marks: ");
scanf(" %d",&max);
averper(num1,num2,num3,&aver,&per,max);
printf("The average = %d",aver);
printf("The percenatge = %d",per);
return 0;
}
void averper(int a,int b,int c,int *d,int *e,int f)
{
*d = (a+b+c)/2;
*e = ((a+b+c)/f)*100;
}
Answers
Answer:
#include <stdio.h>
main()
{
int a,b,c,d,e,f;
char A,B,C,D,E;
printf("Insert Name and Birthday(date only) 1 : \n\a");
scanf("%d",a);
scanf("%s",A);
printf("Insert Name and Birthday(date only) 2 : \n");
scanf("%d",b);
scanf("%s",B);
printf("Insert Name and Birthday(date only) 3 : \n");
scanf("%d",c);
scanf("%s",C);
printf("Insert Name and Birthday(date only) 4 : \n");
scanf("%d",d);
scanf("%s",D);
printf("Insert Name and Birthday(date only) 5 : \n");
scanf("%d",e);
scanf("%s",E);
printf("NO.1 Name : %s Birthday : %d\n\a",a,A);
printf("NO.1 Name : %s Birthday : %d\n",b,B);
printf("NO.1 Name : %s Birthday : %d\n",c,C);
printf("NO.1 Name : %s Birthday : %d\n",d,D);
printf("NO.1 Name : %s Birthday : %d\n",e,E);
printf("%d+%d-%d*%d/%d",a,b,c,d,e);
}