pages

Thursday, 8 April 2021

c-program to check number is divisible by 3 or not in c-language

 program to check number is divisible by 3 or not


#include<stdio.h>
#include<conio.h>
main()
{
    int n;
    printf("enter a number");
    scanf("%d",&n);
    if(n%3==0)
    {
        printf("%d is divisble by 3",n);
    }
    else
    {
        printf("not divsible by 3");
    }
    getch();
}


No comments:

Post a Comment