I need the answers for questions 123 and 4 please Its JavaSo

I need the answers for questions 1,2,3 and 4 please It\'s Java

Solution

#include<iostream>
using namespace std;

int main()
{

  int z=1;

  cout<<\"\\\" lets create a Triangle Shape SHAPE \\\":\ \ \";

  for(int p=1;p<=5;p++)
{
    for(int q=4;q>=p;q--)
   {
    cout<<\" \";
   }
      for(int c=0;c<z;c++)
     {
       cout<<\"*\";  //Now we will be printing asterisk here
     }
      cout<<endl;   // new line
      z=z+2;
}
}

#include<iostream>

using namespace std;

main()

for a square:

{

    int Height, Width;

    cout<< \"Enter Height: \";

    cin>> Height;

    cout<< \"Enter Width:   \";

    cin>> Width;

for(int Width=1; Width<=Height; Width++)

    {

   if(Width <= 1)

   for(int WIdth=1; Width<=Width; Width++)

            {

                cout<< \"*\";

            }

        else if(width<Height)

        {

            cout<< endl;

for(int widthtwo=1; widthtwo<=Width; widthtwo++)

      {

      if(widthtwo==1 || widthtwo==Width)

                    cout<< \"*\";

                else

                    cout<< \" \";

            } //end of for variable width2

        }// end of else if

        else

        {

            cout<< endl;

for(int widththree=1; widththree<=Width; widththree++)

   {

                cout<<\"*\";

            }//end of for having variable width3

        }

    }//This is the end of first for loop

}// finally we will end of main function

I need the answers for questions 1,2,3 and 4 please It\'s JavaSolution#include<iostream> using namespace std; int main() { int z=1; cout<<\
I need the answers for questions 1,2,3 and 4 please It\'s JavaSolution#include<iostream> using namespace std; int main() { int z=1; cout<<\

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site