on C++. I cant figure this out. Please help. Using the ASCII chart in Appendix B, complete
Question:
on C++. I cant figure this out. Please help.
Using the ASCII chart in Appendix B, complete the following program by assigning the char variables with your initials. There are 4 different ways you can assign a value.
Post the values you used in each category:
char: P,O
dec: 80,79
oct: ?,?
hex: ?,?
Sample Output:
Char: PO
Dec: PO
Oct: PO
Hex: PO
// This program demonstrates the close relationship between
// characters and integers.
#include
using namespace std;
int main()
{
char first;
char last;
first = 'P'; // your initials using Char
last = 'O';
cout << "Char: " << first << last << endl;
first = ; // your initials using Base 10
last = ;
cout << "Dec: " << first << last << endl;
first = ; // your initials using Base 8
last = ;
cout << "Oct: " << first << last << endl;
first = ; // your initials using Base 16
last = ;
cout << "Hex: " << first << last << endl;
return 0;
}
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill