Step 4: Inside loop, use if with n % 2 != 0 condition to print odd number. Step 3: Iterate for or while loop according to a user input a number.Step 2: Read the number from user and store it in a.Use the following algorithm to write a c program to print odd numbers from 1 to N (10, 100, 500, 1000) as follows: C Program to Print Odd Numbers from 1 to N using Function Algorithm to Print Odd Numbers from 1 to N.You can also write an awk program using an editor, and then save it as a. C Program to Print Odd Numbers from 1 to N using While Loop For instance, the following will print the number 4, because there are 4.C Program to Print Odd Numbers from 1 to N using For Loop.Algorithm to Print Odd Numbers from 1 to N. Let’s use the following algorithm and program to print odd numbers from 1 to N using for loop, function and while loop in c: Algorithm and Program to Print Odd Numbers from 1 to N in C C program to print odd numbers from 1 to N (10, 100, 500, 1000) Through this tutorial, we will learn how to print odd numbers from 1 to N (10, 100, 500, 1000) in the c program using for loop, while loop and function.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |