Answer:
<em>This program is written in C++</em>
<em>Comment are used to explain difficult lines</em>
<em>The first program that prints 0 to 20 (in decimal) starts here</em>
#include<iostream>
int main()
{
//Print From 0 to 20
for(int i = 0;i<21;i++)
{
std::cout<<i<<'\n';
}
}
<em>The modified program to print 0 to 20 in hexadecimal starts here</em>
#include<iostream>
using namespace std;
int main()
{
//Declare variables to use in conversion;
int tempvar, i=1,remain;
//Declare a char array of length 50 to hold result
char result[50];
//Print 0
cout<<"0"<<endl;
// Iterate from 1 to 20
for(int digit = 1; digit<21; digit++)
{
//Start Conversion Process
//Initialize tempvar to digit (1 to 20)
tempvar = digit;
while(tempvar!=0)
{
//Divide tempvar by 16 and get remainder
remain = tempvar%16;
if(remain<10)
{
result[i++]=remain + 48;
}
else
{
result[i++] = remain + 55;
}
//Get new value of tempvar by dividing it by 16
tempvar/=16;
}
//Print result
for(int l=i-1;l>0;l--)
{
cout<<result[l];
}
i=1;
cout<<endl;
}
return 0;
}
//The Program Ends Here
See Attachments for program 1 and 2; program 2 is the modified version of 1
<span class="sg-text sg-text--link sg-text--bold sg-text--link-disabled sg-text--blue-dark">
cpp
</span>
<span class="sg-text sg-text--link sg-text--bold sg-text--link-disabled sg-text--blue-dark">
cpp
</span>
Answer:
Layer 4
Explanation:
MAC address works at the data link layer (layer 2) of the OSI model. Mac address allows computers to uniquely identify themselves in the network
IP Address is a logical address that works at the network layer of OSI model (layer 3) (actually the IP layer of TCP/IP model).
The port number works at the transport layer of the OSI model (layer 4).The port number uses sequence number to send segments to the correct application thereby ensuring they arrive in the correct order.
Answer:
1)Measure with a ruler or tape measure. ...
2)Place the zero end of your rule at the end of your object. ...
3)Move to the opposite side of the object you are measuring. ...
4))Use a metric or decimal rule with a metric ruler. ...
5)Use a tape measure to measure between objects, for instance, walls.
Explanation:
A ruler marked in 16ths. Every mark is 1/16th of an inch. The center mark between numbers is 1/2. The red lines on these rulers are marked at 1/2, and 1. The next smallest marks on a ruler are 1/4ths.
The BACKSTAGE VIEW is the area in Microsoft where one can perform file commands such as save, open and print.
The backstage view can be found under the file tab in the excel window. It has many options available and they include the following:info, new, open, save, save as, print, share, export and close. These options give the user the opportunity to perform desired functions on their workbook.