the programme
it displays the sum of digits of any no.
AI
สรุปโดย AI: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.
ซอร์สโค้ด
#include<stdio.h>
#include<conio.h>
#include<math.h>
void main()
{
clrscr();
long int n,c,a,e;
int sum=0,d,i;
printf("enter any no.and no.of digits");
scanf("%ld",&n);
scanf("%d",&d);
for(i=0;i<d;i++)
{
sum=sum+(n/10^i)%10;
}
printf("the sum of digits is %d",sum);
getch();
}
ความคิดเห็นดั้งเดิม (3)
กู้คืนจาก Wayback Machine