Ask Your Question
4

What is the method to calculate the total of two whole numbers in the programming language C?

asked 2022-07-26 11:00:00 +0000

david gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2021-04-25 00:00:00 +0000

scrum gravatar image

The method to calculate the total of two whole numbers in the programming language C is by using the addition operator "+".

Example:

int num1 = 10; int num2 = 5; int total = num1 + num2; // The value of total will be 15

printf("The total is %d", total); // Output: The total is 15

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2022-07-26 11:00:00 +0000

Seen: 11 times

Last updated: Apr 25 '21