#include< stdio.h> #include< conio.h> int main() { int n,sum=0,rem,temp; clrscr(); printf("Enter any two digit number:"); scanf("%d",&n); for(temp=n;temp>0;temp=temp/10) { rem=temp%10; sum=sum+rem; } if(n==(sum*3)) printf("\nIts a Peculiar two digit number"); else printf("\nNot a Peculiar two digit number"); getch(); return 0; }
INDEX Chapter 1 Memory map Chapter 2 Data type Chapter 3 Variables in c Chapter 4 Operators and expression Chapter 5 Control structure if else and switch case
31. SUM OF SQUARES OF THE SERIES 12+22+32+--------+n2 void main() { long int r; clrscr(); printf("\nEnter the range: "); scanf("%ld",&r); printf("\nSum of the squares of the series is: %ld",((r*(r+1))*(2*r+1))/6); getch(); } 32. SUM OF CUBES OF THE SERIES 13+23+33+---------+n3 void main() { int r; clrscr(); printf("\nEnter the number range: "); scanf("%d",&r);