ไม่สามารถเล่นวิดีโอนี้
ขออภัยในความไม่สะดวก
C Program to Check a Number for Even or Odd using Switch Statement
ฝัง
- เผยแพร่เมื่อ 11 มี.ค. 2021
- In this tutorial you will learn to write a C Program to Check if a Number is Even or Odd using Switch Statement.
First we ask the user to enter a number and we store that in a variable.
Then we divide that number by 2 and we check for the remainder value.
if the remainder is 0 then it means that the number is even, else the number is odd and then we finally we display the result on the screen using switch statement.
our Social Media Pages
/ exampleprogram
/ exampleprogram
/ examplecomputerprogram
Our Website
www.ExamplePro...
#CProgramming #ExampleProgram
Hello good day, what if the problem has "-" how to do it? like needs to input -9 and needs the outcome "Odd integer"
It is showing error in cpp 7
So how we can remove the error