1. Segmentation Fault (core dumped)

I am currently working on a simple program and was wondering how this segmentation fault is crashing my it. I can't find where exactly this error is taking place and any assistance would be appreciated.

Code:
```#include <stdio.h>

int main()
{

float hw1,hw2,hw3,hw4;

float proj1,proj2,proj3;

float exam1,exam2,exam3;

float total,totalhw,totalproj,totalexam;

printf("Welcome to the CMSC104 grade calculation program. This program will calc\
ulate the final everage and course grade for a student in CMSC104.Each homework is\
worth 4%,each project is worth 8% and each exam worth 20%.\n");

printf("Enter the homework 1 score:\n");
scanf("%f",&hw1);

printf("Enter the homework 2 score:\n");
scanf("%f",&hw2);

printf("Enter the homework 3 score:\n");
scanf("%d",&hw3);

printf("Enter the homework 4 score:\n");

printf("Enter project 3 score;\n");
scanf("%f",&proj3);

printf("Enter exam 1 score:\n");
scanf("%f",&exam1);

printf("Enter exam 2 score:\n");
scanf("%f",&exam2);

printf("Enter exam 3 score:\n");
scanf("%f",&exam3);

}
if(total < 80)(total > 70){
}
if(total < 70)(total > 60){
}
if(total > 60){
}

printf("Thank you for using the grade calculation program!");

return 0;
}```

2. You have an extra curly brace before the if statements

Code:
```if(total < 80)(total > 70)

//should be
if(total < 80 && total > 70)

if(total > 60)
//should be
if(total < 60)```

3. printf("Welcome to the CMSC104 grade calculation program. This program will calc\
ulate the final everage and course grade for a student in CMSC104.Each homework is\
worth 4%,each project is worth 8% and each exam worth 20%.\n");
Two things.
1. Using \ to fold a long string is not the correct way.
2. To print a literal %, you need to write %%. A single % will trigger some kind of conversion in printf.
Code:
```printf("Welcome to the CMSC104 grade calculation program. This program will"
"calculate the final everage and course grade for a student in CMSC104."
"Each homework is worth 4%%, each project is worth 8%% and each exam "
"worth 20%%.\n");```

4. Since you are not using any format specifiers and you are printing a new line at the end, you might as well use puts instead of printf, e.g.,
Code:
```puts("Welcome to the CMSC104 grade calculation program. This program will "
"calculate the final everage and course grade for a student in CMSC104. "
"Each homework is worth 4%, each project is worth 8% and each exam "
"worth 20%.");```

5. Code:
```float hw1,hw2,hw3,hw4;

...

printf("Enter the homework 3 score:\n");
scanf("%d",&hw3);```
Also...
• You are not reading in the 4th homework's score.
• You are not reading in the score for projects 1 & 2.
• You need to calculate a total based on the scores as weighted according to your description.

I can't find where exactly this error is taking place and any assistance would be appreciated.
Well, does it immediately segfault? Before you can enter any data at all? Does it only segfault after you've reached a certain point?