write a program to find a given no. is divisible by 3 or not
without using any arthimetic operators?

Answer Posted / viral

#include<conio.h>
#include<stdio.h>
void main()
{
int a;
clrscr();

printf("enter the number ");
scanf("%d",&a);

if(a%3==0)
printf("the number %d is divisble by 3",a);
else
printf("the number %d is not divisible by 3",a);
getch();
}

Is This Answer Correct ?    20 Yes 48 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

in programming languages a statement or part of a statement that specifies several different execution sequences a) constructs b) distructs c) executes d) none

597


what is a NULL Pointer? Whether it is same as an uninitialized pointer?

755


Explain how can type-insensitive macros be created?

570


Why do we use c for the speed of light?

603


What is string function c?

561






write a proram to reverse the string using switch case?

2461


How many bytes is a struct in c?

721


What is the benefit of using an enum rather than a #define constant?

655


Explain the properties of union.

607


What are the types of operators in c?

610


What is uint8 in c?

637


I have a varargs function which accepts a float parameter?

575


Is it possible to initialize a variable at the time it was declared?

755


What is structure in c explain with example?

631


What is operator promotion?

625