I was creating the following code which is deducing a student's stress level from their usage of negative coping strategies and agreement with low self-image associated statements. Below is my code, and bolded are the parts I had problems with :
void statements (void);
void printweightsstatements(void);
void coping (void);
void printweightscoping(void);
void advice ();
int cumweightstatement();
int cumweightcoping();
void main()
{
statements ();
coping ();
**if (int cumweightstatement + int cumweightcoping>=20)**
printf ("You are very stressed and at a high risk for depression. Please
see a doctor or psychiaqtrist as soon as possible\n");
else if (cumweightstatement + cumweightcoping>=15 && int cumweightstatement + int cumweightcoping<20)
printf ("You are quite stressed and at a moderate risk for depression. Please see your school guidance counselor\n");
else if (cumweightstatement + cumweightcoping<=14)
printf ("You are mildly stressed and at a low risk for depression, but you could still benefit from using positive coping strategies\n")
}
void printweightsstatements()
{
printf("1:Strongly disagree\n");
printf("2:Disagree\n");
printf("3:Neither agree nor disagree\n");
printf("4:Agree\n");
printf("5:Strongly agree\n");
}
void statements(void)
{
int weight1;
int weight2;
int weight3;
int weight4;
printf ("How much do you agree with the following statements?\n");
printf ("Statement 1: I have trouble concentrating on my homework for 1 hour straight\n");
printweightsstatements;
printf("1:Strongly disagree\n");
printf("2:Disagree\n");
printf("3:Neither agree nor disagree\n");
printf("4:Agree\n");
printf("5:Strongly agree\n");
printf ("Statement 2: I do not have much control over events in my life\n");
printweightsstatements;
printf("1:Strongly disagree\n");
printf("2:Disagree\n");
printf("3:Neither agree nor disagree\n");
printf("4:Agree\n");
printf("5:Strongly agree\n");
scanf("%d", &weight2);
printf ("Statement 3: During this school year, I have been stressed a lot\n");
printweightsstatements;
printf("1:Strongly disagree\n");
printf("2:Disagree\n");
printf("3:Neither agree nor disagree\n");
printf("4:Agree\n");
printf("5:Strongly agree\n");
scanf("%d", &weight3);
printf ("Statement 4: Although I try very hard, there is always some schoolwork too difficult for me\n");
printf("1:Strongly disagree\n");
printf("2:Disagree\n");
printf("3:Neither agree nor disagree\n");
printf("4:Agree\n");
printf("5:Strongly agree\n");
scanf("%d", &weight4);
printweightsstatements;
int cumweightstatement=weight1+weight2+weight3+weight4;
}
void coping (void);
{
int weight1;
int weight2;
int weight3;
int weight4;
int weight5;
printf ("How often do you use each of the following coping strategies?\n");
printf ("Strategy 1: Negative self-talk (for example, I can’t do this,this is too hard for me, I’ll never get good at this)\n");
printweightscoping;
scanf("%d", &weight1);
printf ("Strategy 2: Overusing Internet/social media/phone for non-school-related activities (over 1 hour/day)\n");
printweightscoping;
scanf("%d", &weight2);
printf ("Strategy 3: Extended sleep or naps (above 8-9 hours of regular sleep)\n");
printweightscoping;
scanf("%d", &weight3);
printf ("Strategy 4:Procrastination or avoiding the task (leaving your schoolwork to the last minute, or not doing it at all)\n");
printweightscoping;
scanf("%d", &weight4);
printf ("Strategy 5:Denial (ignoring your problems and keep doing things the same way)\n");
printweightscoping;
scanf("%d", &weight5);
int cumweightcoping=weight1+weight2+weight3+weight4;
}
void printweightscoping(void);
{
printf("1:Never\n");
printf("2:Rarely(less than weekly) \n");
printf("3:Sometimes(once a week)\n");
printf("4:Often (several times a week)\n");
printf("5:Always (about daily")
}
This is the log. Do you have any idea how to fix these errors?
main.c: In function 'main':
main.c:23:9: error: expected expression before 'int'
main.c:25:33: error: invalid operands to binary + (have 'int (*)()' and 'int (*)
main.c:25:58: error: expected expression before 'int'
^
main.c:27:33: error: invalid operands to binary + (have 'int (*)()' and 'int (*)
expected identifier or '(' before '{' token