Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

Difference between pass by reference and pass by value?

1108


Write a code to generate a series where the next element is the sum of last k terms.

1186


Who invented b language?

1351


How to set file pointer to beginning c?

1168


What is the difference between #include and #include 'file' ?

1017


Which driver is a pure java driver

1544


Explain what is the benefit of using enum to declare a constant?

1037


Write a program with dynamically allocation of variable.

1083


write a c program to find the sum of five entered numbers using an array named number

2090


Why we use int main and void main?

1036


Write a program to implement a round robin scheduler and calculate the average waiting time.Arrival time, burst time, time quantum, and no. of processes should be the inputs.

1064


what are the 10 different models of writing an addition program in C language?

1858


What are void pointers in c?

973


The purpose of this exercise is to benchmark file writing and reading speed. This exercise is divided into two parts. a). Write a file character by character such that the total file size becomes approximately >10K. After writing close the file handler, open a new stream and read the file character by character. Record both times. Execute this exercise at least 4 times b). Create a buffer capable of storing 100 characters. Now after generating the characters, first store them in the buffer. Once the buffer is filled up, store all the elements in the file. Repeat the process until the total file size becomes approximately >10K.While reading read a while line, store it in buffer and once buffer gets filled up, display the whole buffer. Repeat the exercise at least 4 times with different size of buffer (50, 100, 150 …). Records the times. c). Do an analysis of the differences in times and submit it in class.

2039


What do you mean by dynamic memory allocation in c?

1063