answersLogoWhite

0

/*Programming in C...*/

#include


int main(void)
{

int n ;
printf("enter a number :");
scanf("%d",&n);

if(n%2==0)
{
printf("no is even\n");
}
else
printf("no. is odd\n");

return 0;
}

User Avatar

Wiki User

15y ago

Still curious? Ask our experts.

Chat with our AI personalities

SteveSteve
Knowledge is a journey, you know? We'll get there.
Chat with Steve
CoachCoach
Success isn't just about winning—it's about vision, patience, and playing the long game.
Chat with Coach
DevinDevin
I've poured enough drinks to know that people don't always want advice—they just want to talk.
Chat with Devin
More answers

echo -n "Enter numnber : " read n rem=$(( $n % 2 )) if [ $rem -eq 0 ] then echo "$n is even number" else echo "$n is odd number" fi

User Avatar

Wiki User

13y ago
User Avatar

Add your answer:

Earn +20 pts
Q: Write a shell program to check odd or even number?
Write your answer...
Submit
Still have questions?
magnify glass
imp