C program to print all odd numbers from 1 to n

Write a C program to print all odd numbers from 1 to n using for loop. How to print odd numbers from 1 to n using loop in C programming. Logic to print odd numbers in a given range in C programming.

Example

Input

Input upper limit: 10

Output

Odd numbers between 1 to 10:
1, 3, 5, 7, 9

Read more

C program to print all even numbers from 1 to n

Write a C program to print all even numbers from 1 to n using for loop. C program to generate all even numbers between given range. Logic to print even numbers using if else and for loop in given range in C programming.

Example

Input

Input upper range: 10

Output

Even numbers between 1 to 10:
2, 4, 6, 8, 10

Read more

C program to print alphabets from a to z

Write a C program to print alphabets from a to z using for loop. How to print alphabets using loop in C programming. Logic to print alphabets from a to z using for loop in C programming.

Example

Input

Output

Alphabets: a, b, c, ... , x, y, z

Read more

C program to print all natural numbers from 1 to n

Write a C program to print all natural numbers from 1 to n using loop. C program to print first n natural numbers using loop. How to print natural numbers in a given range using loop. Logic to print natural numbers using for loop in C program.

Example

Input

Input upper limit: 10

Output

Natural numbers from 1 to 10: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10

Read more

C program to print fibonacci series upto n terms

Write a C program to print Fibonacci series up to n terms using loop. How to generate Fibonacci series up to n terms using loops in C programming. Logic to print Fibonacci series in a given range in C programming.

Example

Input

Input number of terms: 10

Output

Fibonacci series: 
0, 1, 1, 2, 3, 5, 8, 13, 21, 34

Read more