To find whether a number is divisible by 50 or not in C language
Answers
Answered by
1
Answer:
// A program to check whether the number is divisible by 50 or not
#include<stdio.h>
int main(){
int input;
printf("Enter a number -\n");
scanf("%d",&input);
if (50 % input == 0)
{
printf("The number is divisible by %d",input);
}
else
{
printf("The number is not divisible by %d",input);
}
return 0;
}
Answered by
0
#include
Class a1
{
Void main()
{
int n;
printf(“Enter the number”);
scanf(“%d”;&n);
if(n%50==0)
{
printf(“%d divisible by 50”,n);
}
else
{
printf(“%d not divisible by 50”,n);
}
}
}
Class a1
{
Void main()
{
int n;
printf(“Enter the number”);
scanf(“%d”;&n);
if(n%50==0)
{
printf(“%d divisible by 50”,n);
}
else
{
printf(“%d not divisible by 50”,n);
}
}
}
Similar questions