Computer Science, asked by Bhanureddy5704, 19 days ago

) Write a C++ program that displays a checkerboard pattern made of stars and
blanks, as shown below. A checkerboard is of size eight squares by eight
squares

Answers

Answered by artyomkorol123
0

Answer:ппхпххпхпххппхпхпх

Explanatio nне:вжано

Answered by qwsuccess
2

The following is the C++ program that displays a checkerboard pattern made of stars and blanks, of size 8x8.

/*

* CheckerBoard.cpp

*

*/

/*

* This application displays a checker board pattern using Asterisks.

* But only three output statements are allowed.

*/

#include <iostream>    // Allows program to output data to the screen.

using namespace std;

// The function main() begins program execution.

int main() {

   int outerLoopCount = 8;

   int innerLoopCount = 8;

   while(outerLoopCount != 0){

   

       while(innerLoopCount != 0){

           cout << "* ";

           innerLoopCount--;

       }

       cout << endl;

       if(outerLoopCount % 2 == 0){

           cout << " ";

       }

       innerLoopCount = 8;

       outerLoopCount--;

   }

 

} // end of function main

Similar questions