new and need help with class project

Hey guys,first time here and hoping to stick around. Im currently enrolled in my first semester and i have to build a program that asks for a section code from 1-3 to be entered, then a 7 digit student id and then the marks for 3 assignments out of 10. Then once its all finished it has to ask for the next student id, however if 0 is entered the program will display the average for the class. Any help or tips would be appreciated.
This is what i have so far. thanks

#include<stdio.h>
int main()
{
int stud[10],stud_id,total,avg;
int mark,section_code,nu_of_course,i,j;
printf("Enter the Section Code");
scanf("%d",&section_code);
for(i=0;i<section_code;)
{
total=0;
avg=0;
printf("Enter Student Id num:");
scanf("%d",&stud_id);
printf("Enter the number of courses:");
scanf("%d",&nu_of_course);
for(j=0;j<nu_of_course;j++)
{
printf("Enter the mark for course%d :",j+1);
scanf("%d",&mark);
total=total+mark;
}
avg=total/nu_of_course;
printf("===========================");
printf("Student id:%d",stud_id);
printf("Total marks: %d",total);
printf("Average:%d",avg);
printf("==========================");

}

}
Topic archived. No new replies allowed.