Answer:
Following are the program to this question:
#include <iostream> //defining header file
using namespace std;
int hailstoneLength(int n) //defining method hailstoneLength
{
int t=1; //defining integer variable assign
while(n!=1) //define a loop that checks value is not equal to 1
{
if(n%2==0) // check even number condition
{
n=n/2; // divide the value by 2 and store its remainder value in n
t++; //increment value of t by 1.
}
else
{
n=n*3+1; //calculate and hold value in n
t++; //increment value of t variable by 1
}
}
return t; //return value
}
int main() //defining main method
{
int n; //defining integer variable
cout<<"Enter any number: "; //print message
cin>> n; //input value
cout<<hailstoneLength(n); //call method and print its value
return 0;
}
Output:
Enter any number: 3
8
Explanation:
Program description can be given as follows:
- In the given C++ language program an integer method "hailstoneLength", is declared, that accepts an integer variable "n" in its parameter.
- Inside the method, an integer variable t is declared, that assign a value that is 1, in the next line, a while loop is declared, that uses if block to check even condition if number is even it divide by 2 and increment t variable value by 1.
- If the number is odd it will multiply the value by 3 and add 1 and increment t by 1 then it will go to if block to check value again. when value of n is not equal to 1 it will return t variable value.
- In the main method, an integer variable "n" is used that call the method and print its return value.
Answer:
Explanation:
The attached figure shows the cone.
Radius of cone, r = 5 ft
Height of the cone, h = 12 ft
We need to find the volume of the figure. The volume of a cone is given by :
So, the volume of the figure is .
Answer:
SSH, HTTPS and SMTP
Explanation:
Data theft can be defined as a cyber attack which typically involves an unauthorized access to a user's data with the sole intention to use for fraudulent purposes or illegal operations. There are several methods used by cyber criminals or hackers to obtain user data and these includes DDOS attack, SQL injection, man in the middle, phishing, etc.
Encryption is a form of cryptography and typically involves the process of converting or encoding informations in plaintext into a code, known as a ciphertext. Once, an information or data has been encrypted it can only be accessed and deciphered by an authorized user.
Some examples of encryption algorithms are 3DES, AES, RC4, RC5, and RSA.
Hence, SSH, HTTPS and SMTP are considered as secure network protocols.
HTTPS is acronym for Hypertext Transfer Protocol Secure while SSL is acronym for Secure Sockets Layer (SSL).
SMTP is an acronym for Simple Mail Transfer Protocol and it uses the standard port number of 25 to provide clients with requested services.
<span>1.
</span>Improve quality of care and reduce health disparities.
<span>2.
</span>Read the orders in the medical record and make
sure to read it back again to verify accuracy.
<span>3.
</span>Maintain the security and privacy of patient
health information.
<span>4.
</span>Talk to the patients and families in management of
their health care.
Answer:
The maximum value that are represented as unsigned n -bit binary integer is . The unsigned binary integer refers to the fixed point of the system that does not contain any fractional digits.
The unsigned binary integer contain module system with the power 2. The number of student table in the class is the best example of the unsigned integer. The numbers can be represented by using the binary notation and bits in the computer system.