diff --git a/C/program-48/README.md b/C/program-48/README.md new file mode 100644 index 00000000..c7269e20 --- /dev/null +++ b/C/program-48/README.md @@ -0,0 +1,5 @@ +Program 48 + +Added a program to check if a number is even or odd. +Variable description- +num-Input number \ No newline at end of file diff --git a/C/program-48/program.c b/C/program-48/program.c new file mode 100644 index 00000000..7223701c --- /dev/null +++ b/C/program-48/program.c @@ -0,0 +1,11 @@ +#include + +int main() { + int num; + printf("Enter a number \n"); + scanf("%d",&num); + if(num%2==0) + printf("%d is an even number",num); + else + printf("%d is an odd number",num); +} \ No newline at end of file