From 70e231a0be34b1d3e53d44146a1facec51327e9d Mon Sep 17 00:00:00 2001 From: Moliki-Salman Date: Thu, 19 Jan 2023 10:16:32 +0100 Subject: [PATCH 1/4] Task 001.c --- TASKS/Task | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 TASKS/Task diff --git a/TASKS/Task b/TASKS/Task new file mode 100644 index 0000000..4875194 --- /dev/null +++ b/TASKS/Task @@ -0,0 +1,16 @@ +/* Write your program after the comment +Write a program that prints the alphabet in lowercase, followed by a new line. +Print all the letters except q and e +use printf +*/ +#include + +int main() +{ + char alpha = 'b'; + + printf("%c, \n", alpha); + + + return 0; +} From a019bdd714f52e07c7fe4bc110e64284c6740863 Mon Sep 17 00:00:00 2001 From: Moliki-Salman Date: Thu, 19 Jan 2023 10:40:06 +0100 Subject: [PATCH 2/4] Task 002.c --- TASKS/Task | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/TASKS/Task b/TASKS/Task index 4875194..dfcdf72 100644 --- a/TASKS/Task +++ b/TASKS/Task @@ -1,16 +1,22 @@ /* Write your program after the comment -Write a program that prints the alphabet in lowercase, followed by a new line. -Print all the letters except q and e -use printf +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 -int main() +int main () { - char alpha = 'b'; - - printf("%c, \n", alpha); + int userScore = 0; - - return 0; + if (userScore < 80) + { + printf("user is not eligile to be enrolled. \n"); + } + else (userScore >= 80); + { + printf("user is enrolled. \n"); + } } From d04a1c29023f87b03b4dd671256d0a10b35af4cd Mon Sep 17 00:00:00 2001 From: Moliki-Salman Date: Thu, 19 Jan 2023 10:56:01 +0100 Subject: [PATCH 3/4] Task 002.c --- TASKS/Task | 3 +++ 1 file changed, 3 insertions(+) diff --git a/TASKS/Task b/TASKS/Task index dfcdf72..b5c7f89 100644 --- a/TASKS/Task +++ b/TASKS/Task @@ -19,4 +19,7 @@ int main () { printf("user is enrolled. \n"); } + + + return 0; } From 3c3352e15027b8546c33c3000e3f687dcf5802ff Mon Sep 17 00:00:00 2001 From: Moliki-Salman Date: Thu, 19 Jan 2023 15:54:47 +0100 Subject: [PATCH 4/4] Task 002.c --- TASKS/Task | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/TASKS/Task b/TASKS/Task index b5c7f89..0b9cd68 100644 --- a/TASKS/Task +++ b/TASKS/Task @@ -7,19 +7,21 @@ If the score is greater than or equal 80, they can be enrolled. #include -int main () -{ - int userScore = 0; - - if (userScore < 80) - { +int main() { + int num; + printf("input your score ", num); + scanf("%d",&num); + printf("You input %d", num); + + + if (num < 80) + { printf("user is not eligile to be enrolled. \n"); } - else (userScore >= 80); + else (num >= 80); { printf("user is enrolled. \n"); } - - return 0; + return 0; }