how to find sum of digits in C?

Answer Posted / nona

int n1, n2, sum;
Console.WriteLine("plz type the 1st number");
n1 = int .Parse (Console .ReadLine ());
Console.WriteLine("plz type the 2nd number");
n2 = int .Parse (Console .ReadLine ());
sum = n1 + n2;

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does 4d mean in c?

943


What is the use of pointers in C?

612


Why isn't any of this standardized in c? Any real program has to do some of these things.

623


How to write a code for reverse of string without using string functions?

1575


Explain the process of converting a Tree into a Binary Tree.

2098






what is reason of your company position's in india no. 1.

1770


What is actual argument?

587


How do you redirect a standard stream?

620


Why flag is used in c?

651


Write a C/C++ program to add a user to MySQL. The user should be permitted to only "INSERT" into the given database.

1493


Why c is called a mid level programming language?

601


What is a header file?

634


When should I declare a function?

621


What is the use of header files?

599


How do you define a function?

579