The program is an illustration of loops.
Loops are used to perform repetitive and iterative operations.
The program in C++ where comments are used to explain each line is as follows:
#include <iostream>
using namespace std;
int main(){
//This declares and initializes all variables
string star = "*", blank = " ", temp;
//The following iteration is repeated 8 times
for (int i = 1; i <= 8; i++) {
//The following iteration is repeated 8 times
for (int j = 1; j <= 8; j++) {
//This prints stars
if (j % 2 != 0) {
cout << star;
}
//This prints blanks
else if (j % 2 == 0) {
cout << blank;
}
}
//This swaps the stars and the blanks
temp = star;
star = blank;
blank = temp;
//This prints a new line
cout << endl;
}
}
Read more about similar programs at:
brainly.com/question/16240864
Answer:
length = float(input("Enter length of the backyard in foot: "))
width = float(input("Enter width of the backyard in foot: "))
sod_price = float(input("Enter the price of sod per square foot: "))
fencing_price = float(input("Enter the price of fencing per foot: "))
area = length * width
perimeter = 2 * (length + width)
cost = sod_price * area + fencing_price * perimeter
print("The cost of landscaping is $" + str(cost))
Explanation:
*The code is in Python.
Ask the user to enter the length, width, sod_price, and fencing_price
Calculate the area and perimeter of the backyard
Calculate the cost, sod_price * area + fencing_price * perimeter
Print the cost
The smallest v groove angle that can be welded using the FCA welding process is 20 degrees. Double v joints help for buckling forces especially in welding thicker metals.
Because of the or keyword in the if statement, only one of the conditions has to be true.
The if statement is true if numA equals 2 or numB equals 2, and numA does equal 2, therefore, the output is yes.
Answer:
The steps that Fatima needs to follow in-order to send an email on the Outlook include:
1. Open the Outlook application.
2. Under the Home tab, click the New Email button.
3. Click the To button to choose a contact
4. Click the Send button after typing the message.
Explanation:
For every new email to be sent out through the Outlook, there are steps to follow like ensuring that the Outlook application is appropriately opened. Later, a<em><u> tab showing new email should be clicked to open the dialogue box for typing the email message.</u></em>
<em>After the message has been typed, a contact to whom the message is going to be sent to is selected before actually sending out the message by a click of a button.</em>