Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //code for divisibility by 7.
- //includes
- #include<stdio.h>
- #include<conio.h>
- //main thread
- int main ()
- {
- int a,b=7;//local variable.
- printf("enter the value of a ");//ask for the number of terms.
- scanf("%d",&a);
- if (a%b == 0)//check if remainder is zero or not.
- { printf("a is divisible by 7");//if true print this.
- }
- else
- {
- printf("a is not divisible by 7 ");//if false print this.
- }
- }
Add Comment
Please, Sign In to add comment