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.
I would say...
C: Use graphics and content for educational purposes in small amounts if you give the creator credit.
Answer:
-
= 1
= 1
Explanation:
Argon atom has atomic number 18. Then, it has 18 protons and 18 electrons.
To determine the quantum numbers you must do the electron configuration.
Aufbau's principle is a mnemonic rule to remember the rank of the orbitals in increasing order of energy.
The rank of energy is:
1s < 2s < 2p < 3s < 3p < 4s < 3d < 4p < 5s < 4d < 5p < 6s < 4f < 5d < 6p < 7s < 5f < 6d < 7d
You must fill the orbitals in order until you have 18 electrons:
- 1s² 2s² 2p⁶ 3s² 3p⁶ : 2 + 2 + 6 + 2 + 6 = 18 electrons.
The last electron is in the 3p orbital.
The quantum numbers associated with the 3p orbitals are:
= 1 (orbitals s correspond to
= 0, orbitals p correspond to
= 1, orbitals d, correspond to
= 2 , and orbitals f correspond to
= 3)
can be -1, 0, or 1 (from -
to +
)
- the fourth quantum number, the spin can be +1/2 or -1/2
Thus, the six possibilities for the last six electrons are:
- (3, 1, -1 +1/2)
- (3, 1, -1, -1/2)
- (3, 1, 0, +1/2)
- (3, 1, 0, -1/2)
- (3, 1, 1, +1/2)
- (3, 1, 1, -1/2)
Hence, the correct choice is:
-
= 1
= 1