l will help you learn programming in C Language. The journey will begin
from small programs and will take you to the most complicated ones through the most easiest, simplest and understandable way. Practice yourself by referring
these from BEGINC and become a programming expert!
In this easy coded program, you will learn how to print even numbers from 1 to 20 using while loop. You will not need to take any input from the user as we are defining the end point. --------------------------------------------------------------------------- Program to Print Even Numbers from 1 to 20 /*Even Numbers from 1 to 20- while Loop*/ #include<stdio.h> void main () { int i =2 ; while (i <=20 ) { printf( "%d \t " , i); i +=2 ; } } Output 2 4 6 8 10 12 14 16 18 20 --------------------------------------------------------------...
Comments
Post a Comment
Please do not comment any spam links in the comment box.