-
Notifications
You must be signed in to change notification settings - Fork 0
/
Program46.c
38 lines (32 loc) · 946 Bytes
/
Program46.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#include<stdio.h>
#include<stdbool.h>
bool CheckDivisible(int iNo) // 15
{
if(((iNo % 3) == 0) && ((iNo % 5) == 0))
{ return true; }
else
{ return false; }
}
int main()
{
int iValue = 0;
bool bRet = false;
printf("Enter number : \n");
scanf("%d",&iValue);
bRet = CheckDivisible(iValue);
if(bRet == true)
{ printf("%d is divisible by 3 & 5\n",iValue); }
else
{ printf("%d is not divisible by 3 or 5\n",iValue); }
return 0;
}
/*
-------------------------------------------------------
Operand 1 Operand 2 && ||
-------------------------------------------------------
true true true true
true false false true
false true false true
false false false false
-------------------------------------------------------
*/