Help with c program (beginner) ( C )

Status
Not open for further replies.

zappb

Smack-Fu Master, in training
93
Entry onto a college course requires a student to have 230 point or greater or have completed a foundation course offered by the college.

Write a program that asks the user to enter in their points and whether or not they have completed the foundation course.

The program should then display whether or not the student is eligible for the course.



- Its the 3rd last question i have to do (out of maybe 10 small programs - i'm very new to this).

i have no idea how to do this one (or the other 2) if you can help, i'd very much appreciate it.
 

Armethius

Ars Tribunus Militum
2,747
Basically like this...

Headers (all your includes and stuff)

int main(void){

declare a variable to hold the points

declare a variable to hold foundation completed (y/n) (0/1) (true/false) whatever you want to do.

Ask the user to input their points and store it in your variable (want to use scanf)

Ask the user to input whether they have completed fund course
(also scanf, make sure you agree on your convention)

Now you will need to use an IF statement with two parts (&& stands for AND, || stands for OR)

something like if( comparison 1 && comparison 2){
do this;
}
else{
do that;
}

Thats purposely pretty vague but it should get you on track.
 
Status
Not open for further replies.