Get Off-Campus Placement Jobs Info !!!
Programs asked in Mettl Coding Round
Click To Practce List of Programs asked in Nagarro !!!

Program Discussion :: Basics

Home > Programs > Basics

9 / 248

Write a function to check the divisibility by 8.

Answer:

#include

int main()
{
    int n;
    printf("Enter the number: ");
    scanf("%d",&n);
    if(n%8==0)
        printf("%d is divisible by 8",n);
    else
        printf("%d is not divisible by 8",n);
    return 0;
}

Asked In :: Global Edge

Post Your Answer Here:

Language:

Post Your Reply Here: