-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexp-4-4.c
More file actions
38 lines (31 loc) · 741 Bytes
/
exp-4-4.c
File metadata and controls
38 lines (31 loc) · 741 Bytes
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
/*************************************************************************
> File Name: exp-4-4.c
> Author: xiaoxiaoh
> Mail: xiaoxxhao@gmail.com
> Created Time: Fri Jun 30 10:32:29 2017
************************************************************************/
/*
* Write a C program to check whether a number is divisible by 5 and 11 or not.
*
* Example
*
* Input
* Input number: 55
*
* Output
* Number is divisible by 5 and 11
*
*/
#include <stdio.h>
int main()
{
int num;
//read number from user
printf("Enter a number: ");
scanf("%d", &num);
if((num%5 == 0) && (num%11 == 0))
printf("%d is divisible by 5 and 11\n", num);
else
printf("%d is not divisible by 5 and 11\n", num);
return 0;
}