Guest User

Untitled

a guest
Jul 20th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. //code to check if the number is a multiple of 3.
  2. //includes
  3. #include <stdio.h>
  4. #include <conio.h>
  5. //main thread
  6. int main()
  7. {
  8. int n;//local variable.
  9. printf("enter the value of a number",n);//enter a value of the number.
  10. scanf("%d",&n);
  11. if ( n / 3 == 1)//check if the number is divisible by 3.
  12. {
  13. printf("The number is a multiple of 3\n");//if the condition is true the print this statement.
  14.  
  15. }
  16. else{
  17. printf("The number is not multiple of 3\n");//if the condition is false then print this statement.
  18.  
  19. }
  20.  
  21. }
Add Comment
Please, Sign In to add comment