C Program – Find whether a given number is a multiple of 3 or not

by Nideesh C on May 9, 2011 · 0 comments

in C Programming




//Downloaded From theonlinetutorials.com
#include"stdio.h"
#include"conio.h"
#include"math.h"
void main()
{
int n;
clrscr();
printf(" Enter a number: ");
scanf("%d",&n);
n=abs(n);
while(n>3)
n-=3;
if(n==3)
printf("no is multiple of 3");
else
printf("no is not multiple of 3");
getch();
}



Not Satisfied ? Just search & get the result

Related Posts Plugin for WordPress, Blogger...
Be Sociable, Share!

Related posts:

  1. C Program to find the perfect numbers below a given number.
  2. C Program To find the fibonacci numbers below a given number.
  3. C program to find the number of integers divisible by 5 between the given range N1 and N2, where N1 < N2 and are integers. Also find the sum of all these integer numbers that divisible by 5 and output the computed results
  4. C Program to find the prime numbers below a given number.
  5. C Program To find the biggest and smallest number and positions in the given array

Leave a Comment

Previous post:

Next post: