### How to print all odd number using c programming

## Print all odd number using c programming

Odd and Even number in c |

- ACM
- algorithm
- arduino project
- basic
- book
- c
- c basic
- c drive
- code
- computer
- database
- Gold winning Project
- google merchant account
- Homemade Robot
- homemade robotics projects
- homemade robots
- how to make a robot
- how to make homemade robot easy
- how to make robot
- how to make robot at home
- html
- internet
- IRO
- java
- learning java
- linked list
- mankind
- Microcomputer
- phone
- PHP MySql
- present
- programming
- shortcut
- star
- tips
- ubuntu
- unity
- voice control robot
- WordPress
- কম্পিউটার

gridpost/book

Odd and Even number in c |

Even and Odd number |

To print all even number from a range in c programming, we have to check all number between given range. To check if the number is odd or even number, we can use this following **logic**:

The rule is, if any number is fully divided by 2, then this number is even. Else the number is odd.

Even and Odd |

If we want to check whether the number 5 odd or even, we need to simply divide the number by 2.

If there is any reminder left, or if there is any value of 5 mod 2 left, that means 5 is not divisible by 2. So 5 is odd number.

We have discuss about the logic behind this code to solve our problem. If you missed the basic logical part, please go back and understand the logic and then try to code yourself.

Swap two number |

At first, the question is what is modulus?

Modulus |

5/2 = 2 and 1 is remainder. Modulus is define by mod.

We can find this remainder easily in c programming. We also can find quotient easily both calculator and using c programming. But sometimes there is no mod button in our scientific calculator. So question is, how to find modulus by simple calculation.

We have to declare some variables and just compare them with each other.

For example, we have 3 number to compare and we have to find the biggest number from them. The logic of comparing 3 number and find the biggest one is pretty simple.

Think, we have number 5, 15 and 10. So we can first compare the first two number with a condition like, is (5 > 15)? If this condition is true, then we will take 5 as the bigger number. But here the condition is not true.

5 is not bigger than 15. So there will be other condition like:

Let's create the form which is not really useful for the first time.

I have consider that you know the basic tags of HTML.

Let's do some HTML code then I will explain:

let me explain something. Here we have use some tag in our code.

We have use:

There is two method. One to GET method and another is POST. Get is use to get something and post is use to posting something in a common sense.

I hope this article is understandable to learn the first step of

If you have any question or suggestion this post(

Here is the step diagram of quick sort:

Let's look at the code:

This is one of the best book for data communication and networking.

Subscribe to:
Posts (Atom)

Powered by Blogger.