Answer:
Given
The above lines of code
Required
Rearrange.
The code is re-arrange d as follows;.
#include<iostream>
int main()
{
int userNum;
scanf("%d", &userNum);
if (userNum > 0)
{
printf("Positive.\n");
}
else
{
printf("Non-positive, converting to 1.\n");
userNum = 1;
printf("Final: %d\n", userNum);
}
return 0;
}
When rearranging lines of codes. one has to be mindful of the programming language, the syntax of the language and control structures in the code;
One should take note of the variable declarations and usage
See attachment for .cpp file
Natural resource systems hope this helps
Answer:
See the below the answer written in Matlab
Explanation:
function inches=feetToInches(feet)
prompt='enter the value of feet in digits';
feet=input(prompt)% ask for the value in feet that needs to be converted to inches
inches =feet*12; % converts feet to inches
x=['the value in inches is: ',num2str(inches)];
disp(x) %display the result of the convertion
end
Answer:
The answer is "Option b"
Explanation:
A straightforward cable is a form of twisted pair cable, which is used in the LAN cable, it provides the connections to RJ-45 cable, that pinout to each end for the same connection. In this cable, that is a sequel, the same kind of computer was interlinked for used by the same routers ports, that's why the technician purchase this cable, and certain options were incorrect that can be described as follows:
- In option a, It is used in the television, that's why it is wrong.
- Option c and Option d both were wrong because It is used in telephones, that provides low-speed apps, and it terminates the network.