<span>A. Both Technicians A and B is the answer</span>
By being willing to communicate and troubleshoot.
Answer:
import java.util.Scanner;
public class num6 {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
System.out.println("Enter number of guest");
int totalGuest = in.nextInt();
System.out.println("Enter number of slices per guest");
int slicesPerGuest = in.nextInt();
System.out.println("How many Slices are on a pizza");
int slicesPerPizza = in.nextInt(); // Assume each pizza has 5 slices
double pizzasNeeded;
//Calculating the pizza Needed
int totalslicesNeeded = totalGuest * slicesPerGuest;
pizzasNeeded = totalslicesNeeded/slicesPerPizza;
System.out.println(pizzasNeeded);
}
}
Explanation:
In this program User is required to enter values for the variables totalGuest, slicesPerGuest and slicesPerPizza
First calculate the totalSlices needed by totalGuest * slicesPerGuest;
The calculate number of pizzas needed by totalslicesNeeded/slicesPerPizza;
Answer:
Following are the code to this question:
#include <iostream> //defining header file
using namespace std;
void numbers(ostream &outs, const string& prefix, unsigned int levels); // method declaration
void numbers(ostream &outs, const string& prefix, unsigned int levels) //defining method number
{
string s; //defining string variable
if(levels == 0) //defining condition statement that check levels value is equal to 0
{
outs << prefix << endl; //use value
}
else //define else part
{
for(char c = '1'; c <= '9'; c++) //define loop that calls numbers method
{
s = prefix + c + '.'; // holding value in s variable
numbers(outs, s, levels-1); //call method numbers
}
}
}
int main() //defining main method
{
numbers(cout, "THERBLIG", 2); //call method numbers method that accepts value
return 0;
}
Output:
please find the attachment.
Explanation:
Program description:
- In the given program, a method number is declared, that accepts three arguments in its parameter that are "outs, prefix, levels", and all the variable uses the address operator to hold its value.
- Inside the method a conditional statement is used in which string variable s and a conditional statement is used, in if the block it checks level variable value is equal to 0. if it is false it will go to else block that uses the loop to call method.
- In the main method we call the number method and pass the value in its parameter.
Answer:
1.6666 g/mol = 1
g/mol
Explanation:
Molar mass of NaOH= 23+16+1 =40g/mol
Mols in 15g = 15/40 mol
If this was dissolved in 225ml of water molarity of the solution is
÷ 225 x 1000 = 1.6666 g/mol = 1
g/mol