Computer Science, asked by deepakpaswan8186, 1 month ago

Write a program that accepts an integer from keyboard and calculates the sum of digits of an integer.

Answers

Answered by gadadithya
0

Answer:

/*

* C program to accept an integer & find the sum of its digits.

#include <stdio.h>

void main()

{

long num, temp, digit, sum = 0;

printf("Enter the number \n");

scanf("%ld", &num);

Similar questions