Answer:
Check the explanation
Explanation:
#include <iostream>
using namespace std;
void hex2dec(string hex_num){
int n = 0;
//Loop through all characters in string
for(int i=0;i<hex_num.size();i++){
//take ith character
char c = hex_num[i];
//Check if c is digit
if(c>='0' && c<='9'){
n = 16*n + (c-48);
}
//Convert c to decimal
else{
n = 16*n + (c-55);
}
}
cout<<hex_num<<" : "<<n<<endl;
}
int main()
{
hex2dec("EF10");
hex2dec("AA");
return 0;
}
The Output can be seen below :
Aerospace, petroleum, and automotive industries
Explanation:
#include <iostream.h>
#inlcude<conion.h>
void main()
{
int count, x;
clrscr();
cout<<"Enter the count:";
cin>> count;
cout<<"Ready!\n";
for(x=count;x>0;x--)
{
cout<<x<<"\n";
}
cout<<"Start";
getche();
}
This is a simple program where the output is expected to be in reverse order. So we run a for loop starting from the count and decrements the counter by 1 every time when the loop runs and print the value. So to print the output in "new line" we include "\n".
Answer:
Highlight cells A1:D4, right-click and select Format Cells, click Alignment, and choose the Merge cells option.
Explanation:
We merge cells with the help of following methods.
<u>Method 1 </u>
- Highlight cells A1:D4
- click on the Home tab
- click on the <u>Merge and Center</u> icon in the Alignment group
1st method is not given in options of question.
<u>Method 2</u>
- Highlight cells A1:D4
- right-click and select Format Cells
- click Alignment
- choose the Merge cells option
<em>2nd method is matching with </em><em><u>option D. </u></em><em>So, Option D is the answer.</em>
<u />
Bacon, go to the bacon! WORSHIP THE BACON!!!!!!!