answersLogoWhite

0


Best Answer

#include<iostream>

#include<queue>

#include<stack>

int main()

{

int x = 0x1f;

int y = 0xa2;

std::cout.hex;

std::cout << "0x" << std::hex << x <<

" + " << "0x" << std::hex << y <<

" = " << "0x" << std::hex << x+y <<

std::endl;

}

User Avatar

Wiki User

βˆ™ 10y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you write sum of two hexadecimal numbers in c plus plus?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is 15 plus 13 in hexadecimal numbers?

Expressed as a sum in hexadecimal form, F + D = 1C.


Write a program in c plus plus for finding the sum of first 10 even numbers?

int i, sum = 0; for (i=0; i&lt;20; i+=2) sum+=i;


What is the answer to Write the sum of the numbers as the product of their GCF and another sum numbers are 27 plus 18120 plus 6 and 9 plus 35?

The set of numbers given are not suited for this since 9 and 35 are co-prime so that the GCF of the given set of numbers is 1. Using a GCF of 1 does not help.


How. to. write an. algorthim. to find the. sum of. first. 15 natural. numbers?

Write an. Algorthim. To. Find the. Sum. Of. First15 natural. Numbers


Hoe can you write a programme to claculate 1 plus 2 plus 3..100?

You add the numbers in a loop. Here is an example in Java:int sum = 0;for (int i = 1; i


What numbers as a sum of two prime numbers 95?

You can't write that as the sum of two prime numbers. Note: Goldbach's Conjecture (for expressing numbers as the sum of two prime numbers) applies to EVEN numbers.


What is the c plus plus program for printing sum to n natural numbers?

main() { int i, n, sum=0; cout&lt;&lt;"Enter the limit"; cin&gt;&gt;n; for(i=0;i&lt;=n;i++) sum=sum+i; cout&lt;&lt;"sum of "&lt;&lt;n&lt;&lt;" natural numbers ="&lt;&lt;sum; getch(); }


How do you write an assembly language program to find the sum of n numbers using array?

write an assembly language program to find sum of N numbers


How do you write the sum of numbers as a product of the gcf and another sum 36 plus 45 then use the distributive property to rewrite the sum?

(4 x 9) + (5 x 9) = (9 x 9)c= 81


How can you determine weather a sum of severals numbers such as 13 plus 45 plus 24 plus 17 is even or odd?

Count how many of the numbers are odd. If an odd number of them are odd, then their sum is odd. If an even number of them are odd, then their sum is even.


Write three numbers whose sum is 10 in all horizontal vertical and diagonal?

Write three numbers whose sum is 10 in all horizontal vertical and diagonal?


What is 74 plus 6?

The sum of 74 plus 6 is a total of 80. Sum is the result you get when adding two numbers together.