Program Discussion :: 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 ::
Language:
Siddhartha Paul
19 Jun, 2019 2:16 PM
#include<stdio.h>
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;
}