DECIMAL TO HEXADECIMAL CONVERSION - CPPIOA002

Description:

Can you help your digital design faculty in correcting the assignment on number conversions decimal number to its equivalent hexadecimal number. By writing a program to convert a decimal number to its equivalent hexadecimal number. Input and Output Format : Input consists of a single integer. Output is the hexadecimal equivalent of the decimal input. [Refer sample input and output for formatting specifications. Test Case 1 Input (stdin) 10 Expected Output A Test Case 2 Input (stdin) 11 Expected Output B

Program :

#include <iostream>

using namespace std;

int main()

{

int n;

  cin>>n;

  n=n+55;

  cout<<char(n);

return 0;

}