Computer Science, asked by pinu25, 1 year ago

Program to input a number and check it is 0 or non 0

Answers

Answered by tejasgupta
5

Heya !!

Since, you didn't mention what programming language you asked for, I'll give you the basic logic of the program..

Here we go !!

~_-~_-~_-~_-~_-~_-~_-~_-~_-~_-~_-~_-~_-~_-~_-~_-~_-~_-~_-~_-~_-~_-~_-~_-~

var a;

Input a;

If a <> 0 Then{

Print "It is a non-zero number.";

Else {

Print "It is zero !"

}}

~_-~_-~_-~_-~_-~_-~_-~_-~_-~_-~_-~_-~_-~_-~_-~_-~_-~_-~_-~_-~_-~_-~_-~_-~

Hope it helps !!

Similar questions