Math, asked by criazhoran31471, 11 months ago

Design a program for accepting decimal number divisible by 2.

Answers

Answered by empathictruro
5

Answer:

number%2=0

Step-by-step explanation:

For the program in any language the basic logic behind is the number divisible by 2 gives the remainder as

that is number%2=0

program in C

#include<iostream.h>

#include<conio.h>

main(){

int i;

printf("enter the number");

scanf("%f", &i)

if(i%2==0)

printf("the number is divisible by 2);

}

Similar questions