How to print odd numbers in range 1 to 10 using c language

Print odd numbers 1 to 10 in c programming- Hello everyone I'm back with a small program that i can't able to do in my lab final exam :( though i'm not a good student but i love to learn new things. I love Programming but I don't have much skill but learning. You will think its funny that I am learning C programming from 2013 but still don't know anything cause I didn't take time to practice c program but now yeah from now i am promising myself i will practice all the programming languages that i know as like i have few knowledge on python, java and php but if i would practiced it now i would be a programming boss but i am so lazy from today i will be not a lazy anymore. Many word are spelled here don't get smilly yah.

Let's see how to print odd numbers in range 1 to 10 using c language. Here you will be able to find the odd numbers with a simple algorithm when some one ask you how you will do it in math then you should say that i will divide all the number between 1 to 10 with 2 then i can find the odd numbers that can't divide with 2. so this simple think you can do in c programming that i could not in my exam so let's see and learn it.

how to print odd numbers in range 1 to 10 using c language

how to print odd numbers in range 1 to 10 using c language

See this screenshot I run it in my device now you can also do it just copy the code i provided bellow and understand it. Don't forget to share if you also learning like me :) . I understand that practice makes a man perfect lol practice makes a man > programmer.


#include <stdio.h>
void main()
{
int i;
printf("Odd numbers in the range 1 to 10:\n");
for (i = 1; i <= 10; i += 2)
{
printf(" %d\n", i);
}
}



Latest Post Is Coming On Programming

0 Comments