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.

:) hey man we dont so assignment for students you must learn then do efforts then we can help you ..

hmmmm...i didn't mean like that.Just to hope i may get some hints while doing it.
cause it really stuck me at the middle......
anyway....is it any tutorials for dummies in stead of buying books?

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

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

i'll try it myself.....
but i afraid i don't have enough time to comprehend all,as the due will be on Tuesday(Malaysia)...
i apologize to my broken english if u guys feel hard to comprehend my english...
anyway....thanks for helping...

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]).

hmmmm...how can i change my nick?
i can't find such an option at the User's Control Panel..
must inform to the admin?

i've referenced my friend's code and written myself one.
but this code seems to have problem while executing.......

#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();
}
#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?

Try

while(Choice >= 1 && Choice <4)

Solve troubles ?

Try

while(Choice >= 1 && Choice <4)

Solve troubles ?

hmmmmm....that more worst.....6 errors...
anyway...thanks for helping...

:-| ,huh more errors when you tried that.I would have thought that immpossible.It's allowed C++ syntax.Either you used it in a wrong way or the error was cause by something else.You did not post the errors though.

Can anyone say there is anything wrong with while(choice >=1 && choice <4) and if so why.

:-| ,huh more errors when you tried that.I would have thought that immpossible.It's allowed C++ syntax.Either you used it in a wrong way or the error was cause by something else.You did not post the errors though.

Can anyone say there is anything wrong with while(choice >=1 && choice <4) and if so why.

hmmmm...sorry pal~~~i would had used the wrong way~~
i had tried many times.....n it did solved my problems~~
thanks...

Please give me all the details about your assignment-- exactly what must it do. I'd be more than happy to write a source file :p

Give me your e-mail and i'll send you the program! (it might be wrong ; i'm just 13)

Don't bump a five month old thread!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.