Computer Science, asked by mohammadusman0078600, 11 months ago

Describe an algorithm to add 2 four-digit numbers

Answers

Answered by arshdhirad
0

Explanation:

start from the ones digit

hpoe u like

Answered by lovingheart
0

The answer is given below

Explanation:

int main(){

   int n,a,s=0;

   printf("Enter a number: ");

   scanf("%d",&n);

   

   while(n>0){

       a=n%10;

       s+=a;

       n=n/10;

   }

   

   printf("\nSum is: %d", s);

   

   return 0;

}

To know more:

  1. Describe c and c++.......​

https://brainly.in/question/10801304

  • Breifly describe c and c++​

https://brainly.in/question/10552938

Similar questions