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 :
Answer:
See attachment for flowchart
Explanation:
The flowchart is represented by the following algorithm:
1. Start
2. Input Mass
3. Input Volume
4 Density = Mass/Volume
5. Print Density
6. Stop
The flowchart is explained by the algorithm above.
It starts by accepting input for Mass
Then it accepts input for Volume
Step 4 of the flowchart/algorithm calculated the Density using the following formula: Density = Mass/Volume
Step 5 prints the calculated Density
The flowchart stops execution afterwards
Note that the flowchart assumes that the user input is of number type (integer, float, double, etc.)
Answer:
<u>Property</u>
Explanation:
Intellectual Property (IP) is the lawful protection of human idea/intellect by unauthorised users. These human intellects are intangible assets that have both moral and commercial value. They include ideas, art, music, movies, software e.t.c.
Common types of Intellectual property include
- Copyrights
- patents
- Trade Marks
- Trade Secrets