1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
DIA [1.3K]
3 years ago
7

Someone help me

Computers and Technology
1 answer:
valkas [14]3 years ago
5 0

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

You might be interested in
Mary is writing an article about the animal kingdom. She wants to place an image below the text. Which menu should Mary choose f
diamong [38]

Answer:

Idk

Explanation:

Idk

8 0
3 years ago
___ is code that runs when a specific event happens.
Slav-nsk [51]
A callback function is code that's called, or run, when a specific event such as a click of the mouse, happens.Callback is another name for a callback function. Thank you for posting your question here at brainly. I hope the answer will help you. Feel free to ask more questions.
6 0
3 years ago
What does the Disk Defragmenter tool do?
rusak2 [61]
 It's kind of a mix between A and C there are some defragmenting tools that show you how much of your PC is wasted by program files. And in some defragmenting tools, it shows you all the files that are fragmented and gives you the option to defrag them or not. So the best answer would be A.  
7 0
3 years ago
Which option correctly identifies the expense that will cost you the most when you are living on your own?
larisa86 [58]
Cccccccccccccccccccccc
5 0
3 years ago
What year does futurist ray kurzweil believe ai will meet human intelligence?.
MariettaO [177]

Answer: 2029

Explanation:

3 0
2 years ago
Other questions:
  • business owners and managers may first balk at the idea of mobile officer workers because there may appear to be a lack of ___ w
    9·1 answer
  • A job posting is the best way to find out what _____ are required for a position.A.aptitudes B.hard skills C.soft skills D.dress
    10·2 answers
  • How does the browser display the same webpage whether you enter the URL or the IP address in the address bar? what system transl
    11·1 answer
  • Write a function called first_last that takes a single parameter, seq, a sequence. first_last should return a tuple of length 2,wh
    14·1 answer
  • A group of 8 bits is called a... <br> A. hunch <br> B. byte <br> C. dozen <br> D. snack
    13·2 answers
  • Can your digital footprint be destroyed or does it remain active on the internet forever
    5·1 answer
  • Write an assembly program that will prompt the user for 3 inputs (let’s abstractly call them a, b, and c) without a leading stri
    13·1 answer
  • 4.In order for a driver to graduate from a learner’s license to an operator’s license, how many hours of driving need to be docu
    15·1 answer
  • In a three-tier architecture, the component that runs the program code and enforces the business processes is the:_______.
    11·1 answer
  • Va rog urgent
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!