Take FREE!! Online Mettl Mock Test to Crack TechM and Other Companies Written Exams.
Get Off-Campus Placement Jobs Info !!!
TCS NQT Technical and Managerial Round Interview Questions

Program Discussion :: Basics

Home > Programs > Basics

9 / 265

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: