Please Need help in C programing not Java Instructions You

/* Please Need help in C programing not Java!!!
Instructions:
You are to create a program that tracks student grades.
When the program launches the user should be presented with three options;

Press 0 to exit
Press 1 for author info
Press 2 to Log in

Selecting 0 exits the program
Selecting 1 prints your name and student id
Selecting 3 prompts the user to enter a user name and password.
You should then open the file \"passwords\" and see if the user is authorized to use the program*
If the username + password was not valid print an error to the user and go back to the previous menu.

*The passwords file will contain a list of user names and passwords, in the format of:
user1 password1
user2 password2
user3 password3

If the username + password was valid present the user with a new menu:
Press 1 for author info
Press 2 to Enter new student
Press 3 to enter grade for existing student
Press 4 to print student records
Press 5 to save student records
Press 6 to load student records
Press 7 to logout

Selecting 0 exits the program
Selecting 1 prints your name and student id
Selecting 2 Prompts the user for a first and last name. Store this information in the system as a student record.
You should be able to handle 1000 students.
Student records have
   First name,
   Last name,
   Student ID,
   A list of grades (up to 100 classes). Grades are entered in grade point format (4.0 for an A)

Selecting 3 prompts the user for a student ID and a grade to be entered. Store this grade in that student\'s record.
Selecting 4 prints the names, ids, GPA and a list of all earned grades for every student. See the sample file for formatting.
Selecting 5 prompts the user for a file name and saves all stored student records to a file. (or in other words, save game)
Selecting 6 prompts the user for a file name and loads student information from a file (or in other words, load game)
Selecting 7 Log out the current user and return to the shorter menu from above.

Your program should also keep a log file of all launch, log in, failed log in, log out, save, load, student creation, grade entry attempts, as well as application exit
This file should be called students.log persist across multiple application starts.
except for exit and start entries, the current logged in username should also be entered in the log.

Note: When loading you can assume all previous student entries are being deleted, rather than detecting repeat students.
*/

Solution

#include<stdio.h>

#include<conio.h>

struct stud

{
  char nam[20];

  int obtain_mark;

  int per;

  char grad[5];

};

struct stud s[5];

int i;

int main()

{

for(i=1; i<=5; i++)

{

printf(\"Enter %d student name : \",i);

  scanf(\"%s\",&s[i].nam);
  printf(\"Enter %d student obtained marks = \",i);
  scanf(\"%d\",&s[i].obtain_mark);
  fflush(stdin);

}

for(i=1; i<=5; i++)
s[i].per=s[i].obtain_mark/5;
for(i=1; i<=5; i++)
{

  if(s[i].per>=80)

  strcpy(s[i].grad,\"A\");

  else if(s[i].per>=60)

  strcpy(s[i].grad,\"B\");

  else if(s[i].per>=50)

  strcpy(s[i].grad,\"C\");

  else if(s[i].per>=40)

  strcpy(s[i].grad,\"D\");

  else

  strcpy(s[i].grad,\"F\");
}

for(i=1; i<=5; i++)

  printf(\"\ %d student %s has obtained grade %s \",i,s[i].nam,s[i].grad);
getch();

return 0;

}

/* Please Need help in C programing not Java!!! Instructions: You are to create a program that tracks student grades. When the program launches the user should
/* Please Need help in C programing not Java!!! Instructions: You are to create a program that tracks student grades. When the program launches the user should

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site