C Program to find sum of cubic roots of individual digits of a number

Examples:

123 : 11/3 + 21/3 + 31/3

Program:

#include<stdio.h>
#include<conio.h>
#include<math.h>

void main()
{
long int no;
float sum = 0;
clrscr();
printf(“Enter a Number : “);
scanf(“%ld”, &no);
while (no > 0)
{
sum = sum + pow(no % 10,(1/3));
no = no / 10;
}
printf(“\nSum is %f\n”, sum);
getch();
}

C program to convert character to ASCII and to find the sum of digits of ASCII value

Program:

#include<stdio.h>
#include<conio.h>
#include<ctype.h>
void main()
{
 char ch;
 int asc;
 int sum = 0;
 clrscr();
 printf("Enter a character : ");
 scanf("%c", &ch);
 asc = toascii(ch);
 printf("\nThe ASCII value of %c is %d", ch, asc);
 while (asc > 0)
 {
  sum = sum + (asc % 10);
  asc = asc / 10;
 }
 printf("\nThe sum is %d", sum);
 getch();
}

C program to find sum of integers between 101 to 200 whose individual digits are prime in nature

#include<stdio.h>
#include<conio.h>

void main()
{
 int i=102, j, k;
 int sum = 0, digitsum;
 int prime;
 clrscr();
 do
 {
  j = i;
  digitsum = 0;
  while (j > 0)
  {
   digitsum = digitsum + (j % 10);
   j = j / 10;
  }
  prime = 1;
  for (k=2; k<digitsum/2; k++)
  {
   if (digitsum % k == 0)
   {
    prime = 0;
    break;
   }
  }
  if (prime == 1)
  {
   sum = sum + i;
  }
  i++;
 } while (i < 200);
 printf("Sum is %d", sum);
 getch();
}