Write a c program to check whether the given number is Armstrong or not

Program to check whether the given Integer number is Armstrong or not

#include<stdio.h> 

int main(){

           int f1,f2,rem,i;

           printf("   Give the First number for the Range :   \n");

           scanf("%d",&f1);

           printf("   Give the Final number for the Range :   \n");

           scanf("%d",&f2);

           printf("\n The Even numbers between %d and %d are ",f1,f2); 

           for(i=f1; i<=f2; ++i){

               rem = i % 2;

               if(rem == 0)

               printf("\n  %d",i);

           }

    return 0; 

    } 

 

Sample outputs:

    Give the First number for the Range :  16

    Give the Final number for the Range :  28


    The Even numbers between 16 and 28 are 

    16

    18

    20

    22

    24

    26

    28

 

Related Popular Posts:

* Write a C program to check whether a given number is odd or even?


* Write a C program to find the sum of even digits present in the given integer number?


* Write a C program to find the sum of even digits and the sum of even digits present in the given integer number?


* Write a C program to display the odd digits present in the given integer number?


* Write a C program to display the even digits present in the given integer number?


* Write a C program to display the odd numbers present in between 1 and 10?

Bookmark and Share