| | |
Many Errors while doing this assignment
![]() |
I'm a fresh in writting C program...
still learning n hav struggling with it~~
could anyone give me some hints to complete it?
--------------------------------------------------------------------------
Create an application, which helps manage the in-course assessments of an intake in COLLEGE X. This program is meant for lecturers to key-in and view, the marks of any assessment of the students. Take the assessments planned for an arbitrary intake of 15 students and design a system whereby marks can be entered and viewed for all 15 students.
The menus below would help you understand the requirements of the system.
Main menu
FF0342 In-course Assessments
1.Test 1
2.Assignment
3.Test 2
4.EXIT program
Choice:_
--------------------------------------------------------------------
Test 1
1.Enter marks
2.View marks
3.Back to Main Menu
Choice:_
-------------------------------------------------------------------------
Similar screens must be provided for the Assignment and Test 2. The program should be made to exit only from the main menu.
For Enter marks option, the user must be given a prompt after entering a student’s mark to continue or to go back to the previous menu. Therefore, the user need not enter ALL marks in one go. The View marks option must display all the marks entered so far, for the particular assessment.
Note: The program must not take in marks for more than the stated 15 students.
Your program must be modular, user-friendly using all efficient programming techniques. Global variables can be declared provided their usage in all the functions declared below it, is justified. There should be no need for graphics in your program, as what is being assessed, is your programming skills not the interface design.
still learning n hav struggling with it~~
could anyone give me some hints to complete it?
--------------------------------------------------------------------------
Create an application, which helps manage the in-course assessments of an intake in COLLEGE X. This program is meant for lecturers to key-in and view, the marks of any assessment of the students. Take the assessments planned for an arbitrary intake of 15 students and design a system whereby marks can be entered and viewed for all 15 students.
The menus below would help you understand the requirements of the system.
Main menu
FF0342 In-course Assessments
1.Test 1
2.Assignment
3.Test 2
4.EXIT program
Choice:_
--------------------------------------------------------------------
Test 1
1.Enter marks
2.View marks
3.Back to Main Menu
Choice:_
-------------------------------------------------------------------------
Similar screens must be provided for the Assignment and Test 2. The program should be made to exit only from the main menu.
For Enter marks option, the user must be given a prompt after entering a student’s mark to continue or to go back to the previous menu. Therefore, the user need not enter ALL marks in one go. The View marks option must display all the marks entered so far, for the particular assessment.
Note: The program must not take in marks for more than the stated 15 students.
Your program must be modular, user-friendly using all efficient programming techniques. Global variables can be declared provided their usage in all the functions declared below it, is justified. There should be no need for graphics in your program, as what is being assessed, is your programming skills not the interface design.
hey man we dont so assignment for students you must learn then do efforts then we can help you .. Real Eyes Realize Real Lies
My Resume
My Resume
•
•
Join Date: Mar 2004
Posts: 1,620
Reputation:
Solved Threads: 51
Hello,
I hope that is not your social security number as a username. If so, please have it changed. One thing I did wrong in college was let my number float out on checks, and well, that was just dumb!
Anyway, your program is going to need a few things:
1) functions to draw out the menus and deal with the input.
2) A storage unit (called a structure) to handle the student numbers and marks for both exams
3) Need to error check your input fields. What if a user types in a letter, when there should have been a number? Something along the lines of 1 < X < 4 so that the program does not go nuts on bad data.
Break up the program, so that each "phase" is done in a function. Then, in your main() part of the program, setup a loop until the program is told to "exit".
Write this thing up. Do some psuedo code if you would like, and we would be happy to look at it from there. If you do post it, keep any personal information, such as your social or phone number, off of the text. We have seen a few people placing their social numbers on the website, and that is dangerous.
Christian
I hope that is not your social security number as a username. If so, please have it changed. One thing I did wrong in college was let my number float out on checks, and well, that was just dumb!
Anyway, your program is going to need a few things:
1) functions to draw out the menus and deal with the input.
2) A storage unit (called a structure) to handle the student numbers and marks for both exams
C Syntax (Toggle Plain Text)
struct studata { int student_number; int test1_mark; int test2_mark; }
3) Need to error check your input fields. What if a user types in a letter, when there should have been a number? Something along the lines of 1 < X < 4 so that the program does not go nuts on bad data.
Break up the program, so that each "phase" is done in a function. Then, in your main() part of the program, setup a loop until the program is told to "exit".
Write this thing up. Do some psuedo code if you would like, and we would be happy to look at it from there. If you do post it, keep any personal information, such as your social or phone number, off of the text. We have seen a few people placing their social numbers on the website, and that is dangerous.
Christian
yea,change you nick.It's hard to think of a number as a human you know.
New to the internet?I agree with kc0arf it is a very bad idea to let your details float around.People can/will put it to misuse(especially on the internet[Take it from a guy who has gone real deep into security]).
New to the internet?I agree with kc0arf it is a very bad idea to let your details float around.People can/will put it to misuse(especially on the internet[Take it from a guy who has gone real deep into security]).
i've referenced my friend's code and written myself one.
but this code seems to have problem while executing.......
but this code seems to have problem while executing.......
C Syntax (Toggle Plain Text)
#include<stdio.h> main(){ int choice, choiceT1, i, a[15],plus,choiceA1,choiceT2; char ans; printf("\t\t\t\tMain menu\n\n"); printf("\t\t\tFF0342 In-course Assessments\n\n"); printf("\t\t\t\t 1. Test1\n"); printf("\t\t\t\t 2. Assignment\n"); printf("\t\t\t\t 3. Test 2\n"); printf("\t\t\t\t 4. EXIT program\n\n"); printf("\t\t\t\t Choice:"); scanf("%d",&choice); i = 0; plus = 0; while( choice != 4 ) { if(choice==1){ printf("\t\t\t\tTest1\n\n"); printf("\t\t\t 1. Enter marks\n"); printf("\t\t\t 2. View marks\n"); printf("\t\t\t 3. Back to Main Menu\n\n"); printf("\t\t\t\t Choice:"); scanf("%d",&choiceT1); if(choiceT1 == 3) return main(); while( choice != 3 ) { if(choiceT1==1) { while (ans != 'n'){ printf("Enter Mark: "); scanf("%d",&a[i]); i++; plus++; printf("Do you want to continue (Y/N)?"); scanf("%s",&ans); if (i==15){ ans = 'n'; } } } else { if(choiceT1 == 2) { for(i=0; i<plus; i++) printf("Mark : %d\n\n", a[i] ); } } printf("\t\t\t\tTest1\n\n"); printf("\t\t\t 1. Enter marks\n"); printf("\t\t\t 2. View marks\n"); printf("\t\t\t 3. Back to Main Menu\n\n"); printf("\t\t\t\t Choice:"); scanf("%d",&choiceT1); if( i < 15 ) ans = 'y'; else ans = 'n'; if(choiceT1 == 3){ return main(); } } } } while( choice != 4 ) { if(choice==2){ printf("\t\t\t\tAssigment\n\n"); printf("\t\t\t 1. Enter marks\n"); printf("\t\t\t 2. View marks\n"); printf("\t\t\t 3. Back to Main Menu\n\n"); printf("\t\t\t\t Choice:"); scanf("%d",&choiceA1); if(choiceA1 == 3) return main(); while( choice != 3 ) { if(choiceA1==1) { while (ans != 'n'){ printf("Enter Mark: "); scanf("%d",&a[i]); i++; plus++; printf("Do you want to continue (Y/N)?"); scanf("%s",&ans); if (i==15){ ans = 'n'; } } } else { if(choiceA1 == 2) { for(i=0; i<plus; i++) printf("Mark : %d\n\n", a[i] ); } } printf("\t\t\t\tAssigment\n\n"); printf("\t\t\t 1. Enter marks\n"); printf("\t\t\t 2. View marks\n"); printf("\t\t\t 3. Back to Main Menu\n\n"); printf("\t\t\t\t Choice:"); scanf("%d",&choiceA1); if( i < 15 ) ans = 'y'; else ans = 'n'; if(choiceA1 == 3){ return main(); } } } } while( choice != 4 ) { if(choice==3){ printf("\t\t\t\tTest2\n\n"); printf("\t\t\t 1. Enter marks\n"); printf("\t\t\t 2. View marks\n"); printf("\t\t\t 3. Back to Main Menu\n\n"); printf("\t\t\t\t Choice:"); scanf("%d",&choiceT2); if(choiceT2 == 3) return main(); while( choice != 3 ) { if(choiceT2==1) { while (ans != 'n'){ printf("Enter Mark: "); scanf("%d",&a[i]); i++; plus++; printf("Do you want to continue (Y/N)?"); scanf("%s",&ans); if (i==15){ ans = 'n'; } } } else { if(choiceT2 == 2) { for(i=0; i<plus; i++) printf("Mark : %d\n\n", a[i] ); } } printf("\t\t\t\tTest2\n\n"); printf("\t\t\t 1. Enter marks\n"); printf("\t\t\t 2. View marks\n"); printf("\t\t\t 3. Back to Main Menu\n\n"); printf("\t\t\t\t Choice:"); scanf("%d",&choiceT2); if( i < 15 ) ans = 'y'; else ans = 'n'; if(choiceT2 == 3){ return main(); } } } } return main(); }
C Syntax (Toggle Plain Text)
#include<stdio.h> main(){ int Choice , Choice_test1 , Assignment , Choice_test2 , i , counter=0; int a[15] , b[15] , c[15]; printf("\n\n\t\t\t\tMain menu\n\n"); printf("\t\t\tFF0342 In-course Assessments\n\n"); printf("\t\t\t\t1. Test 1\n"); printf("\t\t\t\t2. Assignment\n"); printf("\t\t\t\t3. Test 2\n"); printf("\t\t\t\t4. EXIT program\n\n"); printf("\t\t\t\tChoice:"); scanf("%d",&Choice); while (1<=Choice<4){ if (Choice==1){ printf("\n\n\t\t\t\tTest 1\n\n"); printf("\t\t\t1. Enter marks\n"); printf("\t\t\t2. View marks\n"); printf("\t\t\t3. Back to Main Menu\n\n"); printf("\t\t\t\tChoice:"); scanf("%d", &Choice_test1); if (Choice_test1==3) return main(); while (1<=counter<3){ if (Choice_test1==1){ for (i=0;i<15;i++){ printf("Enter student's mark:"); scanf("%d", &a[i] ); } } else{ if (Choice_test1==2){ for (i=0;i<15;i++) printf("Student's mark:%d\n\n", a[i]); } } printf("\n\n\t\t\t\tTest 1\n\n"); printf("\t\t\t1. Enter marks\n"); printf("\t\t\t2. View marks\n"); printf("\t\t\t3. Back to Main Menu\n\n"); printf("\t\t\t\tChoice:"); scanf("%d", &Choice_test1); if (Choice_test1==3) return main(); } } if (Choice==2){ printf("\n\n\t\t\t\tAssignment\n\n"); printf("\t\t\t1. Enter marks\n"); printf("\t\t\t2. View marks\n");\ printf("\t\t\t3. Back to Main Menu\n\n"); printf("\t\t\t\tChoice:"); scanf("%d",&Assignment); if (Assignment==3) return main(); while (1<=counter<3){ if (Assignment==1){ for (i=0;i<15;i++){ printf("Enter student's mark:"); scanf("%d", &b[i] ); } } else{ if (Assignment==2){ for (i=0;i<15;i++) printf("Student's mark:%d\n\n", b[i]); } } printf("\n\n\t\t\t\tAssignment\n\n"); printf("\t\t\t1. Enter marks\n"); printf("\t\t\t2. View marks\n"); printf("\t\t\t3. Back to Main Menu\n\n"); printf("\t\t\t\tChoice:"); scanf("%d", &Assignment); if (Assignment==3) return main(); } } if (Choice==3){ printf("\n\n\t\t\t\tTest 2\n\n"); printf("\t\t\t1. Enter marks\n"); printf("\t\t\t2. View marks\n"); printf("\t\t\t3. Back to Main Menu\n\n"); printf("\t\t\t\tChoice:"); scanf("%d", &Choice_test2); if (Choice_test2==3) return main(); while (1<=counter<3){ if (Choice_test2==1){ for (i=0;i<15;i++){ printf("Enter student's mark:"); scanf("%d", &c[i] ); } } else{ if (Choice_test2==2){ for (i=0;i<15;i++) printf("Student's mark:%d\n\n", c[i]); } } printf("\n\n\t\t\t\tTest 2\n\n"); printf("\t\t\t1. Enter marks\n"); printf("\t\t\t2. View marks\n"); printf("\t\t\t3. Back to Main Menu\n\n"); printf("\t\t\t\tChoice:"); scanf("%d", &Choice_test2); if (Choice_test2==3) return main(); } } } return 0; }
i'm using this "while (1<=Choice<4)",but it shown few warnings....
how can i solve this?
![]() |
Similar Threads
- C++ errors, Can anyone help? (C++)
- Help me with this Hash Table assignment..PLESE I beg you guys. (C++)
Other Threads in the C Forum
- Previous Thread: Slow CPU causes damage to robot
- Next Thread: Please help with my quicksort
| Thread Tools | Search this Thread |
* adobe ansi api array arrays binarysearch calculate centimeter char character cm convert copyanyfile copypdffile cprogramme createcopyoffile createprocess() csyntax directory dynamic feet fflush file floatingpointvalidation fork forloop frequency getlasterror getlogicaldrivestrin givemetehcodez global graphics gtkgcurlcompiling gtkwinlinux hacking highest homework i/o inches incrementoperators intmain() iso km linked linkedlist linux linuxsegmentationfault list locate logical_drives loopinsideloop. lowest match matrix microsoft mqqueue mysql oddnumber odf open opendocumentformat openwebfoundation pattern pdf performance pointer posix power program programming pyramidusingturboccodes read recursion recv recvblocked repetition reversing scanf scheduling segmentationfault send shape single socketprograming socketprogramming stack standard strchr string suggestions test unix urboc user variable voidmain() whythiscodecausesegmentationfault win32api windows.h





