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:
(A)AES
Explanation:
WPA2 (Wi-Fi Protected Access 2) is a security protocol which was developed by the Wi-Fi Alliance in 2004. It was used to replace the security protocol of WEP(Wired Equivalent Privacy) and WPA.
Unlike the previous security protocol, WPA2 uses the Dvanve Encryption Standard (AES) instead of the RC4 stream cipher. WPA3 has been developed but it is not yet widely in use.
Answer: SCM
Explanation:
SCM stand for supply chain management system and it is amazon's competitive strategy. The amazon SCM is the strategic of being the retailer according to the customer's choice.
Inventory system for multi-tier is the major component for the amazon's SCM. The main key aspect for the amazon supply chain management is that it is responsible for development in the trade market over years.The amazon SCM are basically responsible for analysis all the major growth and productivity ij the market by using the supply chain management process.
Mnhhbjhhhhdndkdjdjddnnxnx
To make text bold, select and highlight the text first. Then hold down Ctrl (the control key) on the keyboard and press B on the keyboard. To make text italic, select and highlight the text first. Then hold down Ctrl (the control key) on the keyboard and then press the I on the keyboard