PROGRAM TO CHECK WHETHER A GIVEN NUMBER IS ARMSTRONG OR NOT

/*PROGRAM TO CHECK WHETHER A GIVEN NUMBER IS ARMSTRONG OR NOT*/ #include<stdio.h> #include<conio.h> void main() { int n,temp,arm=0,rem; clrscr(); printf(“Enter the number: “); scanf(“%d”,&n); temp=n; while(temp!=0) { rem=temp%10; temp=temp/10; arm=arm+rem*rem*rem; …

PROGRAM TO PRINT FIBONACCI SERIES

/*PROGRAM TO PRINT FIBONACCI SERIES*/ #include<stdio.h> #include<conio.h> void main() { int a,b,c,i,n; clrscr(); printf(“Enter the limit of the series: “); scanf(“%d”,&n); if(n<1) printf(“Enter only positive number”); else { printf(“\nFibonacci series …

PROGRAM TO CALCULATE GRADE OF A STUDENT

/*PROGRAM TO CALCULATE GRADE OF A STUDENT*/ #include<stdio.h> #include<conio.h> void main() { int max,t=0; float a,b,c,sum=0,per=0; clrscr(); printf(“Enter the maximum marks for each subject: “); scanf(“%d”,&max); printf(“Enter the marks obtained …

PROGRAM TO CHECK WHETHER A GIVEN NUMBER IS PALINDROME OR NOT

/*PROGRAM TO CHECK WHETHER A GIVEN NUMBER IS PALINDROME OR NOT*/ #include<stdio.h> #include<conio.h> void main() { int n,temp,rev=0,rem; clrscr(); printf(“Enter the number: “); scanf(“%d”,&n); temp=n; while(temp>0)            //FINDING REVERSE { rem=temp%10; …

PROGRAM TO USE BITWISE AND OPERATOR BETWEEN TWO INTEGERS

/*PROGRAM TO USE BITWISE AND OPERATOR BETWEEN TWO INTEGERS*/ #include<stdio.h> #include<conio.h> void main() { int a,b,d=0; clrscr(); printf(“Enter any two integers: “); scanf(“%d%d”,&a,&b); d=a&b;        //BITWISE AND OPERATION printf(“After using bitwise …