Answer:
Explanation:
#include <iostream>
using namespace std;
// Recipe of single portion salad
int main()
{
float Qing[3]={0.0,0.0,0.0};
string ItemName[3]={" "," "," "};
int qty=0;
cout<<"Please enter 3 Ingredients required for Salad and Quantity required for a single serve"<<endl;
for (int i=0;i<3;i++)
{
cout<<"Enter the ingredient number "<<(i+1)<<" :";
cin>>ItemName[i];
cout<<"Qty required for single serve (in Oz) :";
cin>>Qing[i];
}
cout<<"Number of servings required :";
cin>>qty;
cout<<endl<<"Total Quantities required for "<<qty<<" servings"<<endl;
for (int i=0;i<3;i++)
{
cout<<ItemName[i]<<" Qty for "<<qty<<" servings :"<<(Qing[i]*qty)<<" Oz."<<endl;
}
return 0;
}
// You can run this after compiling without any problem.
Answer:
See explaination
Explanation:
#Run the code in the python version 3.x.
#Define the function.
def shampoo_instructions(num_cycles):
#Check the cycles to be greater than 1.
if num_cycles < 1:
#Display the statement.
print('Too few.')
#Check the cycles to be greater than 4.
elif num_cycles > 4:
#Display the statement.
print('Too many.')
#The else part.
else:
#Initialize the variable.
N = 1;
#Begin the for loop.
for N in range(N, num_cycles+1):
#Print the result.
print(N , ": Lather and rinse.")
#Print the statement.
print('Done.')
#Call the function.
shampoo_instructions(2)
Click the Word Count in the Proofing Group. Maybe the name is the Bottom ribbon tab
Answer:
The correct output of this question is "Sneezy Sleepy".
Explanation:
In the given code firstly we create the object of the integer class that is first in this we pass the integer value that is 7. Then we declare another second integer variable is this variable we pass object as a reference. Then we use the two conditional statements. In the first, if block we check that the object of the class is equal to the reference variable. If it is true it prints Sneezy. otherwise, it will print Grumpy. In second if block we check that the object of the class is equal to the reference variable. but in this time we the equals() function it is the same as(==). If the condition is true it prints Sleepy. otherwise, it will print Doc. So the output of the code is Sneezy Sleepy.
Knowledge...- software QA engineer
Master’s...- business analyst
course...- network and computer admin
training...- multimedia artist