[Updated] Goldman Sachs Aptitude Test Questions and Answers
Practice List of TCS Digital Coding Questions !!!
Take 50+ FREE!! Online Data Interpretation Mock test to crack any Exams.

Program Discussion :: Basics

Home > Programs > Basics

328 / 279

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: