Skip to main content

Posts

Showing posts with the label Numbers from a to b using for Loop

C Program to Print Numbers from a to b using for Loop

In this easy coded program, you will learn how to print numbers from a to b using for loop, where the values of both will be taken from the user. --------------------------------------------------------------------------- Program to Print Numbers from a to b using for Loop /*Print Numbers from a to b- for Loop*/ #include<stdio.h> void main () {     int a, b;     printf( "Enter First Number: " );     scanf( "%d" , & a);     printf( " \n Enter Last Number: " );     scanf( "%d" , & b);     for ( ; a <= b; a ++ )     {         printf( "%d \t " , a);     }   Output Enter First Number : 3 Ent...