Friday, March 17, 2023

"programme to check whether a number odd or even using modulo operator " using c

 //programme to check whether a number odd or even using modulo operator

#include <stdio.h>
int main (){
    int num;
    printf ("entr the number :");
    scanf ("%i",&num);
    if (num%2==0){
        printf ("%i is the even number ",num);

    }
    else {
             printf ("%i is the odd number ",num);
    }
    return 0;
}

No comments:

Post a Comment

print a multiplication table of any integer taking from user

 // print a multiplication table of any integer taking from user  #include "stdio.h" int main () { int n,mul,i; printf ("...