Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 29 additions & 1 deletion TASKS/Task 002.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,32 @@ Write a program that asks and reads the score of a user
If the score is less than 80, display to the user that they
are not elgible to be enrolled.
If the score is greater than or equal 80, they can be enrolled.
*/
*/
#include <stdio.h>

/**
* main - A program to reads user scores
*
* Return: 0 (success)
*/
int main(void)
{
int myScore;

/*Ask the student to input score*/
printf("Type in your score please: \n");
/*Get and save the number the student types*/
scanf("%d", &myScore);
/*Output the number the user typed*/
printf("Your score is : %d\n", myScore);

if (myScore >= 80)
{
printf("Congratulations you have met the cut off\n");
}
else if (myScore < 80)
{
printf("You are not eligible to continue with the program\n");
}
return (0);
}