Computer Science, asked by emmalee, 1 year ago

write a program to accept a number and check whether it is divisible by 5 or not in c++

Answers

Answered by sonu806
1
C++is not available in phones

emmalee: ok not c++ c
sonu806: I don't know what is c
emmalee: c program
Riyakajal011: c is a programming language
Answered by siddhartharao77
2
#include<stdio.h>

void main()
{
int i;

printf("Enter a number:");

scanf("%d",&i);

if(i%5 == 0)
{

printf("Entered number is divisible by 5");

}

else

{

printf("Entered number is not divisible by 5");

}

getch();

}


Hope this helps!

siddhartharao77: :-)
Similar questions